Commit f9abf7af authored by guanghongwei's avatar guanghongwei

Merge branch 'master' into guanghongwei

parents 94beae52 e5fe1333
...@@ -7,7 +7,7 @@ from django.shortcuts import render_to_response ...@@ -7,7 +7,7 @@ from django.shortcuts import render_to_response
from django.http import HttpResponseRedirect from django.http import HttpResponseRedirect
from django.core.paginator import Paginator, EmptyPage, PageNotAnInteger from django.core.paginator import Paginator, EmptyPage, PageNotAnInteger
from models import IDC, Asset, Group from models import IDC, Asset, UserGroup
from connect import PyCrypt, KEY from connect import PyCrypt, KEY
...@@ -20,7 +20,7 @@ def jadd(request): ...@@ -20,7 +20,7 @@ def jadd(request):
groups = [] groups = []
cryptor = PyCrypt(KEY) cryptor = PyCrypt(KEY)
eidc = IDC.objects.all() eidc = IDC.objects.all()
egroup = Group.objects.all() egroup = UserGroup.objects.all()
is_actived = {'active': 1, 'no_active': 0} is_actived = {'active': 1, 'no_active': 0}
login_typed = {'LDAP': 'L', 'SSH_KEY': 'S', 'PASSWORD': 'P', 'MAP': 'M'} login_typed = {'LDAP': 'L', 'SSH_KEY': 'S', 'PASSWORD': 'P', 'MAP': 'M'}
...@@ -40,7 +40,7 @@ def jadd(request): ...@@ -40,7 +40,7 @@ def jadd(request):
j_idc = IDC.objects.get(name=j_idc) j_idc = IDC.objects.get(name=j_idc)
for group in j_group: for group in j_group:
c = Group.objects.get(name=group) c = UserGroup.objects.get(name=group)
groups.append(c) groups.append(c)
if Asset.objects.filter(ip=str(j_ip)): if Asset.objects.filter(ip=str(j_ip)):
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment