login_required for a generic view in URLconf

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
from django.conf.urls.defaults import *
from django.contrib.auth.decorators import login_required
from django.views.generic.list_detail import object_list

extra_apps_option = {
  #queryset ...
}

urlpatterns = patterns('',
    (r'^conf/$',  login_required(object_list), extra_apps_option),                       
)

More like this

  1. SWFUpload auth decorator by debrice 4 years, 3 months ago
  2. HTTP basic auth decorator by bthomas 4 years, 3 months ago
  3. ad-hoc request authentication by mwicat 2 years ago
  4. LoginRequiredMixin by slink 2 years ago
  5. view by view basic authentication decorator by Scanner 6 years ago

Comments

(Forgotten your password?)