django-login-logout-auth

1)src - project directory

2)mystie - main login stuffs

Templates

contain html files

  • mysite
    1. home.html
    2. login.html
    3. register.html
  • registration
    1. logged_out.html

URLS :

src urls :

from django.contrib.auth import views as auth_views

will import the authentication stuff
for r'^login/' we used template name : 'mysite/login.html'
for r'^logout/' we used template name : 'registration/logged_out.html'

including mysite urls with

url(r'^',include('mysite.urls')

mysite urls :

for r'^$' it will call home.html
for r'^register' it will call register.html

Forms :

from django import forms

username = forms.charField(required = true, max_length = 32, lable = "username")