Greetings!
Question:
I wrote a view (def register(request)) to check if DB is empty, user can to create a new SuperUser. When DB is empty, "register" view works fine on GET request. but when user is submitting her/his info (via POST request), then he/she must be redirected to "login" url (mean: now user should enter USER and PASS in login page). but a "login" is added after "register/" in browser-address-bar.
note: inserting data (superuser) to DB works fine. but redirect doesn't work.
uploaded code:
https://pastebin.com/fLibTNP9
uploaded error:
why "login" is appended to address-bar after "register/" !?
where is the problem !?
thanks in advance
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/50508d1b-0936-43ac-9f99-776fc06369d2%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
No comments:
Post a Comment