Skip to content

Commit 391ad52

Browse files
committed
Add login and signup links to guest form
1 parent 4ca3152 commit 391ad52

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

apps/users/templates/a4_candy_users/guest_create.html

+9-1
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,18 @@
66
{% block content %}
77
<h1>Continue as Guest</h1>
88
<p>
9+
{% url 'account_login' as login_url %}
10+
{% url 'account_signup' as signup_url %}
11+
{% with next_param=request.GET.next %}
12+
{% with login_url=login_url|add:"?next="|add:next_param %}
13+
{% with signup_url=signup_url|add:"?next="|add:next_param %}
914
{% blocktranslate %}Already have an account? Then please
1015
<a href="{{ login_url }}">login</a>.{% endblocktranslate %}
1116
{% blocktranslate %}You want to create a user account? Then please
12-
<a href="{{ login_url }}">create account</a>.{% endblocktranslate %}
17+
<a href="{{ signup_url }}">create account</a>.{% endblocktranslate %}
18+
{% endwith %}
19+
{% endwith %}
20+
{% endwith %}
1321
</p>
1422
<form id="signup_form" method="post" action="">
1523
{{ form.non_field_errors }}

apps/users/views.py

+1
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ def get_context_data(self, **kwargs):
3232
print(context)
3333
print(self.request.GET.get("next", ""))
3434
context["next"] = self.request.GET.get("next", "")
35+
# context["login_url"] = account_urls.login_url
3536
return context
3637

3738
def get_initial(self):

0 commit comments

Comments
 (0)