I've got a particular case that I wonder if it is worth submitting a
patch for...

I do not have an /accounts/profile/ URL and for the site I'm building
it doesn't make sense to have a profile page.  But I do need
login/logout functionality and am using django.contrib.auth.  I'm also
providing "Login" and "Logout" links in the navigation of the site.

When the user clicks on a URL who's view is decorated by
login_required, they get sent to the login page and the hidden "next"
form field is populated correctly.  No problems here.

But, if they click on the login link directly, "next" is empty, and so
it defaults to /accounts/profile/.

What I'd like to do is create a patch that allows one to specify the
default redirect_to field when next is empty so I can override the
/accounts/profile/ setting.

Usage would look something like this in the urls.py:

   (r'^login/$', 'django.contrib.auth.views.login', \
       {'template_name': 'account/login.html', \
        'default_redirect_to': '/'}),

Worthwhile?

In the meantime, I can set up a redirect from /accounts/profile/ to /,
but this seems hackish to me.

Cheers!
Rob


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Django 
developers" 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-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to