django.contrib.auth.views.login
from django.contrib.auth import views
urlpatterns = patterns('',
...
url(r'^login/$', views.login,{'template_name':'login.html'},name="login"),
)
from django.contrib.auth import views
urlpatterns = patterns('',
...
url(r'^login/$', views.login,{'template_name':'login.html'},name="login"),
)
from django.contrib.auth import views
from django.contrib.auth import login, authenticate
from django.http import HttpResponseRedirect
def super_auth(request):
if request.user == superuser:
authenticate(username=request.user.username)# здесь надо поколдовать
login(request, request.user)
return HttpResponseRedirect('/')
return views.login(request, template_name = 'login.html')