Use custom authentication backend with admin

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
"""urls.py"""
from django.conf.urls.defaults import *
from django.contrib import admin

admin.autodiscover()
admin.site.login = login_required(admin.site.login)

urlpatterns = patterns('',
    (r'^accounts/login/$', 'mycustom.auth.view'),
)

More like this

  1. Use both NTLM and Anonymous authentication with IIS by ungenio41 3 years, 8 months ago
  2. Adding buttons to submit line in a Admin page by marinho 5 years, 11 months ago
  3. Authenticate with Email Address by thom 7 years ago
  4. SimpleMachines forum authentication backend by kropp 6 years, 2 months ago
  5. Hidden Date Display Widget for Admin by andrew.schoen 4 years, 8 months ago

Comments

wilfred (on December 11, 2012):

Don't forget

from django.contrib.auth.decorators import login_required

#

(Forgotten your password?)