Skip to content
Snippets Groups Projects
Commit 159c0cdd authored by Saif Ali's avatar Saif Ali
Browse files

Login and SignUp

parent 3eb1d876
No related branches found
No related tags found
No related merge requests found
from django.contrib import admin
# Register your models here.
#nothing new needed here
......@@ -3,3 +3,4 @@ from django.apps import AppConfig
class AccountsConfig(AppConfig):
name = 'accounts'
#inorder to start an app
\ No newline at end of file
from django.db import models
# Create your models here.
#databases models
from django.test import TestCase
# Create your tests here.
# Create your tests here. for security
......@@ -7,4 +7,5 @@ urlpatterns = [
url(r'^signup/$', views.signup_view, name="signup"),
url(r'^login/$', views.login_view, name="login"),
url(r'^logout/$', views.logout_view, name="logout"),
]
\ No newline at end of file
]
#created by Saif Ali
\ No newline at end of file
......@@ -18,7 +18,7 @@ def login_view(request):
if request.method == 'POST':
form = AuthenticationForm(data=request.POST)
if form.is_valid():
# log the user in
# lets the users log in
user = form.get_user()
login(request, user)
if 'next' in request.POST:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment