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. Generic object_detail view with multiple named URL filters by cotton 5 months, 1 week ago
  2. object-oriented generic views by carljm 3 years, 9 months ago
  3. ModelForm-based create_update generic views by carljm 3 years, 10 months ago
  4. View dispatch based on HTTP verb by malcolmt 4 years, 7 months ago
  5. Generic Views for newforms by jnievas 4 years, 3 months ago

Comments

(Forgotten your password?)