just as in #377, having default next hardcoded doesn't feel good, pythonic, etc., but a simple hack has come to remedy that:
--- views.py (wersja 4454)
+++ views.py (kopia robocza)
@@ -8,7 +8,7 @@
from django.contrib.auth.decorators import login_required
from django.contrib.auth import LOGIN_URL, REDIRECT_FIELD_NAME
-def login(request, template_name='registration/login.html'):
+def login(request, template_name='registration/login.html', default_next='/accounts/profile/'):
"Displays the login form and handles the login action."
manipulator = AuthenticationForm(request)
redirect_to = request.REQUEST.get(REDIRECT_FIELD_NAME, '')
@@ -17,7 +17,7 @@
if not errors:
# Light security check -- make sure redirect_to isn't garbage.
if not redirect_to or '://' in redirect_to or ' ' in redirect_to:
- redirect_to = '/accounts/profile/'
+ redirect_to = default_next
from django.contrib.auth import login
I'm aware that it's not a generic view, but it doesn't make sense for so much to be hardcoded just for what seems purely naming reasons.