On Wed, 2007-06-06 at 04:12 +0000, [EMAIL PROTECTED] wrote:
> 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?
An explanation of what you expect to happen and what is actually
happening for a start, along with any error message.
How are your trying to use login_required in your template? Your initial
paragraph says you are trying to use the login_required *decorator*, but
that is something that applies to Python code, not inside a template.
Regards,
Malcolm
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---