From fb2e2278241c6f962054b2e9a763df29374c9b8c Mon Sep 17 00:00:00 2001 From: Bob <1397910458@qq.com> Date: Thu, 15 Oct 2020 11:51:00 +0800 Subject: [PATCH] =?UTF-8?q?#=E6=9B=B4=E6=94=B9=E6=95=B0=E6=8D=AE=E5=BA=93?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- dashboard/views.py | 3 ++- .../organization-management-create.html | 20 +++++++++---------- management/views.py | 4 ++-- 3 files changed, 14 insertions(+), 13 deletions(-) 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 @@ -