I'm trying to use the login_required decorator with the
direct_to_template generic view. I've read through the "Extending
Generic Views" section of DjangoBook (as recommended in a similar post
in this group) but I must be missing something.

Here's my best attempt:

urlpatterns = patterns('',
    url(r'^$', 'django.views.generic.simple.direct_to_template',
{'template': 'main.html', 'login_required': 'True'}),
)

What am I missing?


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to