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