When a user logs on, I want to invoke a special method.
There doesn't appear to be a way to add a hook/callback
to django.contrib.auth.views.login, so my approach is to:

1. Create mysite/login/views.py and copy the login/logout
  methods from django into it.  Add code to invoke post-login
  function.

2. Edit urls.py:
  (r'^accounts/login/', 'mysite.login.views.login'),
  (r'^accounts/logout/', 'mysite.login.views.logout'),

3. Add 'mysite.login' to INSTALLED_APPS.

This works fine, but I'm wondering if there's a better,
less non-DRY way.

Jeff Bauer


--~--~---------~--~----~------------~-------~--~----~
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