summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorcoderick142017-05-18 12:02:41 +0530
committercoderick142017-05-18 12:02:41 +0530
commit852a7275289af676143e3116451c3504e0d258e1 (patch)
tree1b32669df7110f2a9490ad5c27f26137286b4875
parentb136f2d0dc9b47e44f2efb04ee66c74c5ad0b63c (diff)
downloadSBHS-2018-Rpi-852a7275289af676143e3116451c3504e0d258e1.tar.gz
SBHS-2018-Rpi-852a7275289af676143e3116451c3504e0d258e1.tar.bz2
SBHS-2018-Rpi-852a7275289af676143e3116451c3504e0d258e1.zip
Add field last_login in account.create method
-rw-r--r--account/views.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/account/views.py b/account/views.py
index 306b318..9b580c4 100644
--- a/account/views.py
+++ b/account/views.py
@@ -8,6 +8,7 @@ from django.contrib.auth import authenticate
from django.contrib.auth import login as LOGIN
from django.contrib.auth import logout as LOGOUT
from django.contrib.auth.decorators import login_required
+from datetime import datetime
# Create your views here.
def index(req):
@@ -63,7 +64,8 @@ def create(req):
name=name,
username=username,
email=email,
- board_id=Board.allot_board()
+ board_id=Board.allot_board(),
+ last_login=datetime.now().strftime("%Y-%m-%d %H:%M")
)
account.set_password(password)
account.save()