diff --git a/dashboard/views.py b/dashboard/views.py index 6d6594b..badbf6b 100644 --- a/dashboard/views.py +++ b/dashboard/views.py @@ -1,6 +1,7 @@ import json import http.client import random +from django.utils import timezone import time from urllib import parse from captcha.helpers import captcha_image_url @@ -250,7 +251,7 @@ def register(request): return HttpResponseRedirect('/register/') if username is not None and password is not None and confirm_password is not None and email is not None and flag: - user = User.objects.create_user(username, email, password) + user = User.objects.create_user(username, email, password,last_login = timezone.now() ) user.is_active = True # user.is_staff = True # user.first_name = phone diff --git a/management/templates/management/organization-management-create.html b/management/templates/management/organization-management-create.html index 2c719e5..4af5f42 100644 --- a/management/templates/management/organization-management-create.html +++ b/management/templates/management/organization-management-create.html @@ -61,16 +61,16 @@ -
- -
- -
-
+{#
#} +{# #} +{#
#} +{# #} +{#
#} +{#
#}
diff --git a/management/views.py b/management/views.py index 904ccac..730e886 100644 --- a/management/views.py +++ b/management/views.py @@ -585,7 +585,7 @@ def organization_create(request): else: image = 'danweimoren.jpg' - organizationtype = request.POST.get('organizationtype') + # organizationtype = request.POST.get('organizationtype') level_id = request.POST.get('level_id') province = request.POST.get('province') if province != '': @@ -602,7 +602,7 @@ def organization_create(request): messages.error(request, '您注册的主体已经存在') return HttpResponseRedirect('/management/organization/create/') if name is not None: - organization = Organization(name=name, image=image, organizationtype_id=organizationtype, + organization = Organization(name=name, image=image, province=province, cities=city, district=district, town=town, village=village, level_id=level_id, status='0') organization.save()