mirror of
https://gitea.mueller.network/extern/django-helpdesk.git
synced 2024-11-21 23:43:11 +01:00
replace hardcoded path ../ to reverse_lazy URL
This commit is contained in:
parent
2d561d15c8
commit
b1316214c7
@ -36,7 +36,9 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<input class="btn btn-lg btn-primary btn-block" type='submit' value='{% trans "Login" %}' />
|
<input class="btn btn-lg btn-primary btn-block" type='submit' value='{% trans "Login" %}' />
|
||||||
<input type="hidden" name="next" value="{% if next %}{{ next }}{% else %}../{% endif %}" />
|
{% if next %}
|
||||||
|
<input type="hidden" name="next" value="{{ next }}" />
|
||||||
|
{% endif %}
|
||||||
{% csrf_token %}</form>
|
{% csrf_token %}</form>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -9,7 +9,7 @@ urls.py - Mapping of URL's to our various views. Note we always used NAMED
|
|||||||
|
|
||||||
from django.contrib.auth import views as auth_views
|
from django.contrib.auth import views as auth_views
|
||||||
from django.contrib.auth.decorators import login_required
|
from django.contrib.auth.decorators import login_required
|
||||||
from django.urls import include, path, re_path
|
from django.urls import include, path, re_path, reverse_lazy
|
||||||
from django.views.generic import TemplateView
|
from django.views.generic import TemplateView
|
||||||
from helpdesk import settings as helpdesk_settings
|
from helpdesk import settings as helpdesk_settings
|
||||||
from helpdesk.decorators import helpdesk_staff_member_required, protect_view
|
from helpdesk.decorators import helpdesk_staff_member_required, protect_view
|
||||||
@ -215,7 +215,7 @@ urlpatterns += [
|
|||||||
path(
|
path(
|
||||||
"logout/",
|
"logout/",
|
||||||
auth_views.LogoutView.as_view(
|
auth_views.LogoutView.as_view(
|
||||||
template_name="helpdesk/registration/login.html", next_page="../"
|
template_name="helpdesk/registration/login.html", next_page=reverse_lazy("helpdesk:home")
|
||||||
),
|
),
|
||||||
name="logout",
|
name="logout",
|
||||||
),
|
),
|
||||||
|
Loading…
Reference in New Issue
Block a user