If your REQUIRE_LOGIN_PATH is different in settings you can use this
middleware

http://www.djangosnippets.org/snippets/136/

Satheesh

On Jul 8, 2:25 pm, Daniel Hepper <[EMAIL PROTECTED]> wrote:
> Writing a middleware is probably a good solution.
>
> You can use this 
> one:http://superjared.com/entry/requiring-login-entire-django-powered-site/
>
> HTH,
> Daniel
>
> Am Dienstag, den 08.07.2008, 02:13 -0700 schrieb [EMAIL PROTECTED]:
>
> > Django offers @login_required to redirect user to login method.
> > But, If the site force user to login at first before they can do
> > something, I have to add @login_required to every views.
> > How to solve this problem with a more elegent way?
--~--~---------~--~----~------------~-------~--~----~
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