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

bug 1490727: Add new page for payment terms, for now just empty template #5075

Merged
merged 1 commit into from Nov 6, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
21 changes: 21 additions & 0 deletions kuma/payments/jinja2/payments/payment_terms.html
@@ -0,0 +1,21 @@
{% extends 'base.html' %}

{% block title %}{{ page_title(_('MDN Payment terms')) }}{% endblock %}

{% block site_meta %}
{{ super() }}
{% set seo_description = _('MDN Payment terms') %}
{% set social_title = _('MDN Payment terms') %}
<meta property="og:description" content="{{ seo_description }}">
<meta name="description" content="{{ seo_description }}">
<meta name="twitter:description" content="{{ seo_description }}">
<meta name="twitter:title" content="{{ social_title }}">
<meta property="og:title" content="{{ social_title }}">
{% endblock %}


{% block content %}

<h1>{{ _('MDN Payment terms') }}</h1>

{% endblock %}
10 changes: 10 additions & 0 deletions kuma/payments/tests/test_views.py
Expand Up @@ -17,6 +17,16 @@ def test_contribute_view(mock_enabled, client, settings):
assert response.status_code == 200


@pytest.mark.django_db
@mock.patch('kuma.payments.views.enabled')
def test_payment_terms_view(mock_enabled, client, settings):
"""If enabled, contribution page is returned."""
mock_enabled.return_value = True
response = client.get(reverse('payment_terms'))
assert_no_cache_header(response)
assert response.status_code == 200


@pytest.mark.django_db
@mock.patch('kuma.payments.views.enabled')
def test_thanks_view(mock_enabled, client, settings):
Expand Down
5 changes: 4 additions & 1 deletion kuma/payments/urls.py
Expand Up @@ -14,5 +14,8 @@
name='recurring_payment_initial'),
url(r'^recurring/subscription/?$',
views.contribute_recurring_payment_subscription,
name='recurring_payment_subscription')
name='recurring_payment_subscription'),
url(r'^terms/?$',
views.payment_terms,
name='payment_terms'),
]
6 changes: 6 additions & 0 deletions kuma/payments/views.py
Expand Up @@ -128,3 +128,9 @@ def contribute_recurring_payment_subscription(request):
'recurring_payment': True
}
return render(request, 'payments/payments.html', context)


@skip_if_disabled
@never_cache
def payment_terms(request):
return render(request, 'payments/payment_terms.html')
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: payments/terms.html would work, since it is already namespaced

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 I'll address this in a later PR.