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 django-users@googlegroups.com 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 -~----------~----~----~----~------~----~------~--~---