Set default login redirect to dashboard

No longer need to specify LOGIN_REDIRECT_URL
This commit is contained in:
Karl Hobley 2015-01-19 14:05:55 +00:00
parent 5d3dc6fcbe
commit 32f2dddaa3
2 changed files with 4 additions and 3 deletions

View file

@ -143,8 +143,6 @@ TEMPLATE_CONTEXT_PROCESSORS = global_settings.TEMPLATE_CONTEXT_PROCESSORS + (
# Wagtail settings
LOGIN_REDIRECT_URL = 'wagtailadmin_home'
WAGTAIL_SITE_NAME = "{{ project_name }}"
# Use Elasticsearch as the search backend for extra performance and better search results:

View file

@ -22,7 +22,10 @@
<form action="{% url 'wagtailadmin_login' %}" method="post" autocomplete="off">
{% csrf_token %}
<input type="hidden" name="next" value="{{ next }}" />
{% url 'wagtailadmin_home' as home_url %}
<input type="hidden" name="next" value="{{ next|default:home_url }}" />
<h1>{% trans "Sign in to Wagtail" %}</h1>