Re: logout() method for custom authentication backends
On Mon, Dec 1, 2008 at 8:10 AM, David Reynolds <[EMAIL PROTECTED]> wrote: > That doesn't help if you want to continue using the login/logout views > from django.contrib.auth.views Since you can drop callables directly into URL patterns, you can write a decorator which does what you need, import the logout view into your URLConf, decorate it there and then use the resulting callable in a URL pattern. -- "Bureaucrat Conrad, you are technically correct -- the best kind of correct." --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django developers" group. To post to this group, send email to django-developers@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-developers?hl=en -~--~~~~--~~--~--~---
Re: logout() method for custom authentication backends
On 1 Dec 2008, at 12:27, Julien Phalip wrote: > I think you could achieve that without patching Django. You could > simply create a custom view which wraps around auth.logout and calls > your other method. That doesn't help if you want to continue using the login/logout views from django.contrib.auth.views -- David Reynolds [EMAIL PROTECTED] --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django developers" group. To post to this group, send email to django-developers@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-developers?hl=en -~--~~~~--~~--~--~---
Re: logout() method for custom authentication backends
On Dec 1, 11:07 pm, David Reynolds <[EMAIL PROTECTED]> wrote: > On 1 Dec 2008, at 11:49, David Reynolds wrote: > > I have a custom authentication backend that requires a method to be > > run to log out of the system. It would be quite useful if there was a > > way > > to hook into the django.contrib.auth.logout method to run this custom > > method. I think you could achieve that without patching Django. You could simply create a custom view which wraps around auth.logout and calls your other method. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django developers" group. To post to this group, send email to django-developers@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-developers?hl=en -~--~~~~--~~--~--~---
Re: logout() method for custom authentication backends
On 1 Dec 2008, at 11:49, David Reynolds wrote: > > I have a custom authentication backend that requires a method to be > run to log out of the system. It would be quite useful if there was a > way > to hook into the django.contrib.auth.logout method to run this custom > method. > > The best way I can think of is to add a logout method to the > authentication backend which is called from within the > django.contrib.auth.logout method. > > Does anyone have any thoughts on this? Would it be useful for any > other backends? I suppose additionally, it might be useful to do the same thing for login too. -- David Reynolds [EMAIL PROTECTED] --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django developers" group. To post to this group, send email to django-developers@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-developers?hl=en -~--~~~~--~~--~--~---