0
私はdjango-registration-reduxを使用しています。私はnavbarにログインフォームを持っています。私はログイン後も同じページにとどまりたいです。すなわち、ログイン後に私がmypage.com/polls/exampleにいる場合、私はmypage.com/polls/exampleに戻って、設定で設定されたURLには戻りません。 HTML内からログイン後にリダイレクトするdjango-registration-redux
ログインは次のようになります。
{% url "auth_login" as login_url %}
{% if login_url not in request.get_full_path %}
<li>
<form class="navbar-form" method="POST" action={{ login_url }}>{% csrf_token %}
<input type="text" class="form-control top-bar" name="username" placeholder="email" />
<input type="password" class="form-control top-bar" name="password" placeholder={% trans "password" %} />
<button type="submit" class="btn btn-default">{% trans "Login" %}</button>
</form>
</li>
{% endif %}
はどのように私はそれを行うのですか?