thanks ;)
On Monday, May 28, 2012 9:43:34 PM UTC+1, Rafael Durán Castañeda wrote:
--El 28/05/12 22:13, Rafael Dur�n Casta�eda escribi�:El 28/05/12 21:28, psychok7 escribi�:I've just realized, my las message is wrong, LOGIN_REDIRECT is where users are redirected by default (https://docs.djangoproject.yes i read that part before posting, but i just dont understand the beahaviour of the normal login that redirects me somewhere and the login after registration that redirects me elsewhere. wich one should i use?Django, by default, redirects you to LOGIN_URL after successful login unless next is given as query string (see https://docs.djangoproject.
On Monday, May 28, 2012 8:15:28 PM UTC+1, Rafael Dur�n Casta�eda wrote:--El 28/05/12 20:18, psychok7 escribi�:anyone?From django-registration docs:
On Monday, May 28, 2012 1:54:20 AM UTC+1, psychok7 wrote:hi there i am writing an app using django-registration 0.8 installed from pip and using the simple-backend--
my problem is, when i register a new user it logs me in after inserting in the db and redirects me to /users/<username>/ but if i login normally using the�django.contrib.auth it redirects me to accounts/profile.
my question is, how do i unify this redirect since it should take me to the same place?
thanks
You received this message because you are subscribed to the Google Groups "Django users" group.
To view this discussion on the web visit https://groups.google.com/d/msg/django-users/-/okwBS3_ .w15gJ
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to django-users+unsubscribe@googlegroups.com .
For more options, visit this group at http://groups.google.com/group/django-users?hl=en .
Upon successful registration, the default redirect is to the URL specified by the get_absolute_url() method of the newly-created User object; by default, this will be /users/<username>/, although it can be overridden in either of two ways:
- Specify a custom URL pattern for the register() view, passing the keyword argument success_url.
- Override the default get_absolute_url() of the User model in your Django configuration, as covered in Django�s settings documentation.
http://docs.b-list.org/django-
HTHregistration/0.8/simple- backend.html
You received this message because you are subscribed to the Google Groups "Django users" group.
To view this discussion on the web visit https://groups.google.com/d/msg/django-users/-/T_ .tBN05Lbk4J
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to django-users+unsubscribe@googlegroups.com .
For more options, visit this group at http://groups.google.com/group/django-users?hl=en .
com/en/dev/topics/auth/#the- ), accounts/profile in your case, and registration backend is redirecting you to /users/<username>. So you can change LOGIN_URL or override registration redirects as docs explain.login-required-decorator
Bye
com/en/dev/ref/settings/# ) and I didn't mention that also depends of your login view (but I think not in this case).login-redirect-url
Bye
You received this message because you are subscribed to the Google Groups "Django users" group.
To view this discussion on the web visit https://groups.google.com/d/msg/django-users/-/2WA0uQWMDKEJ.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to django-users+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
No comments:
Post a Comment