Skip to content
This repository has been archived by the owner on Oct 27, 2022. It is now read-only.

Commit

Permalink
Merge 65c8871 into bc2a424
Browse files Browse the repository at this point in the history
  • Loading branch information
Ntu2ko Trevor committed Apr 6, 2017
2 parents bc2a424 + 65c8871 commit 6990578
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 1 deletion.
10 changes: 10 additions & 0 deletions molo/profiles/templates/profiles/login_success.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{% extends "base.html" %}
{% load i18n %}

{% block content %}
<h1 class="heading heading--profiles">{% trans "Login Success" %}</h1>
<div class="profiles">
<h4 class="heading heading--feeback-title">{% trans "Login Successful!" %}</h4>
<a href="/">{% trans "Home Page" %}</a>
</div>
{% endblock %}
2 changes: 1 addition & 1 deletion molo/profiles/templates/registration/login.html
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ <h4 class="heading heading--subtitle">
<span class="input-hint">({% trans "Eg.: 2086" %})</span>
</fieldset>
<input type="submit" value="{% trans "Log in" %}">
<input type="hidden" name="next" value="{% if request.GET.next %}{{ request.GET.next }}{% else %}{{request.site.root_page.url}}{% endif %}" />
<input type="hidden" name="next" value="{% url "molo.profiles:login_success" %}" />
</form>
<a href="{% url "molo.profiles:forgot_password" %}" class="profiles__forgotten-password">{% trans "Forgotten your password?" %}</a>
</div>
Expand Down
4 changes: 4 additions & 0 deletions molo/profiles/tests/test_views.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,10 @@ def test_login(self):
response = self.client.get(reverse('molo.profiles:auth_login'))
self.assertContains(response, 'Forgotten your password')

def test_login_success(self):
response = self.client.get(reverse('molo.profiles:login_success'))
self.assertContains(response, 'Login Successful!')

def test_warning_message_shown_in_wagtail_if_no_country_code(self):
site = Site.objects.get(is_default_site=True)
settings = SettingsProxy(site)
Expand Down
7 changes: 7 additions & 0 deletions molo/profiles/urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,4 +52,11 @@
),
name="reset_password_success"
),
url(
r"^login-success/$",
TemplateView.as_view(
template_name="profiles/login_success.html"
),
name="login_success"
),
]

0 comments on commit 6990578

Please sign in to comment.