Python Url不更改,只需在登录后呈现模板

Python Url不更改,只需在登录后呈现模板,python,django,django-registration,Python,Django,Django Registration,用户登录后,URL未更改,数据也未提取 登录后,url未更改(我希望更改为127.0.0.1:8000/雇主/家庭) 雇主/home.html 作业ID标题显示在 {作业%中作业的%s} {{job.title} {{job.postdate} {%endfor%} login.html {%csrf\u令牌%} 登录到我的帐户。。。 {%if错误%} 对不起,这不是有效的用户名或密码 {%endif%} 您的密码是什么 登录 您需要使用下一个url参数告诉它登录后要去哪里: <for

用户登录后,URL未更改,数据也未提取

登录后,url未更改(我希望更改为127.0.0.1:8000/雇主/家庭)

雇主/home.html

作业ID标题显示在
{作业%中作业的%s}
{{job.title}
{{job.postdate}
{%endfor%}
login.html
{%csrf\u令牌%}
登录到我的帐户。。。
{%if错误%}

对不起,这不是有效的用户名或密码

{%endif%} 您的密码是什么

登录
您需要使用
下一个
url参数告诉它登录后要去哪里:

<form class="form-signin" action="{% url django.contrib.auth.views.login %}?next=employer/home/" method="post">

或在以下设置中设置:

contrib.auth.login
视图没有下一个参数时,登录后重定向请求的URL

<table class="table table-hover table-bordered">
<tr><th>Job ID</th><th>Title</th><th>Posted on</th></tr>
{% for job in jobs %}
<tr>
<td><a href="{% url quorum.views.questions job.pk %}">{{ job.pk }}</a></td>
<td>{{ job.title }}</td>
<td>{{ job.postdate }}</td>
</tr>
{% endfor %}
</table>
<form class="form-signin" action="" method="post">{% csrf_token %}
<h4 class="form-signin-heading">Sign in to my account...</h4>
{% if errors %}
<p class="text-error">Sorry, that's not a valid username or password</p>
{% endif %}

<input type="text" id="username" class="input-block-level" name="username" placeholder="UserID">
<input type="password" id="password" class="input-block-level" name="password" placeholder="Password">
<p style="text-align:right;"><a href="/accounts/password/reset/">Forgot</a> your password?</p>

<button class="btn btn-large btn-success" type="submit" value="login">Sign in</button>

</form>
<form class="form-signin" action="{% url django.contrib.auth.views.login %}?next=employer/home/" method="post">