On Wed, Sep 16, 2009 at 4:53 AM, Robert <[email protected]> wrote: > > As a business requirement we have to show login form in an ajax > response for some login_required actions. I want to change the > login_required decorator to behaive differently in case the request is > an ajax request and not a normal GET / POST request. > > What do you think is the best way to override the login_required > decorator without changing django code ? > > If Django's login_required doesn't do what you want, create your own decorator that does, and name it something else. Trying to use the same name as a Django-provided function and make it do something slightly different is bound to lead to confusion at some point.
Karen --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---

