Re: Middleware to replace @login_required SOLVED, + PCI Compliance

2009-10-15 Thread Shawn Milochik
Ethan, Thanks for the feedback. I did create my own middleware, and it was ridiculously simple. I just looked at the django.middleware files and saw how easy it was. I only had to make exceptions for the pages pertaining to resetting a forgotten password (from django.contrib.auth.views) and the

Re: Middleware to replace @login_required

2009-10-15 Thread Ethan Jucovy
On Thu, Oct 15, 2009 at 12:24 PM, Shawn Milochik wrote: > > Middleware question: > > If 100% of an apps views require a logged-in user except for the login > page, does it makes sense to have middleware check the URL and > redirect to the login page rather than putting the

Middleware to replace @login_required

2009-10-15 Thread Shawn Milochik
Middleware question: If 100% of an apps views require a logged-in user except for the login page, does it makes sense to have middleware check the URL and redirect to the login page rather than putting the @login_required decorator over all the views? I have to ensure that users' passwords