From: Stephen Finucane Date: Wed, 6 Jun 2018 14:45:18 +0000 (+0100) Subject: templates: Rename additional templates X-Git-Tag: v2.2.0-rc1~270 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=dd44ded7f606a4fd3622b59de2ca890d72564363;p=thirdparty%2Fpatchwork.git templates: Rename additional templates Make ALL the things consistent. Signed-off-by: Stephen Finucane --- diff --git a/patchwork/templates/patchwork/download_buttons.html b/patchwork/templates/patchwork/download-buttons.html similarity index 100% rename from patchwork/templates/patchwork/download_buttons.html rename to patchwork/templates/patchwork/download-buttons.html diff --git a/patchwork/templates/patchwork/mail-form.html b/patchwork/templates/patchwork/mail.html similarity index 100% rename from patchwork/templates/patchwork/mail-form.html rename to patchwork/templates/patchwork/mail.html diff --git a/patchwork/templates/patchwork/registration_form.html b/patchwork/templates/patchwork/registration.html similarity index 100% rename from patchwork/templates/patchwork/registration_form.html rename to patchwork/templates/patchwork/registration.html diff --git a/patchwork/templates/patchwork/submission.html b/patchwork/templates/patchwork/submission.html index f03e1408..6e189b27 100644 --- a/patchwork/templates/patchwork/submission.html +++ b/patchwork/templates/patchwork/submission.html @@ -28,7 +28,7 @@ function toggle_div(link_id, headers_id)

{{ submission.name }} -{% include "patchwork/download_buttons.html" %} +{% include "patchwork/download-buttons.html" %}

@@ -285,7 +285,7 @@ function toggle_div(link_id, headers_id) {% if submission.diff %}

Patch - {% include "patchwork/download_buttons.html" %} + {% include "patchwork/download-buttons.html" %}

diff --git a/patchwork/tests/test_mail_settings.py b/patchwork/tests/test_mail_settings.py index 2c826692..34b3f868 100644 --- a/patchwork/tests/test_mail_settings.py +++ b/patchwork/tests/test_mail_settings.py @@ -33,14 +33,14 @@ class MailSettingsTest(TestCase): def test_post_empty(self): response = self.client.post(reverse('mail-settings'), {'email': ''}) self.assertEqual(response.status_code, 200) - self.assertTemplateUsed(response, 'patchwork/mail-form.html') + self.assertTemplateUsed(response, 'patchwork/mail.html') self.assertFormError(response, 'form', 'email', 'This field is required.') def test_post_invalid(self): response = self.client.post(reverse('mail-settings'), {'email': 'foo'}) self.assertEqual(response.status_code, 200) - self.assertTemplateUsed(response, 'patchwork/mail-form.html') + self.assertTemplateUsed(response, 'patchwork/mail.html') self.assertFormError(response, 'form', 'email', error_strings['email']) def test_post_optin(self): diff --git a/patchwork/tests/test_registration.py b/patchwork/tests/test_registration.py index 5e7a49db..6e74d98f 100644 --- a/patchwork/tests/test_registration.py +++ b/patchwork/tests/test_registration.py @@ -42,7 +42,7 @@ class RegistrationTest(TestCase): def test_registration_form(self): response = self.client.get('/register/') self.assertEqual(response.status_code, 200) - self.assertTemplateUsed(response, 'patchwork/registration_form.html') + self.assertTemplateUsed(response, 'patchwork/registration.html') def test_blank_fields(self): for field in ['username', 'email', 'password']: diff --git a/patchwork/views/mail.py b/patchwork/views/mail.py index f6bdbb47..280f4e8c 100644 --- a/patchwork/views/mail.py +++ b/patchwork/views/mail.py @@ -35,7 +35,7 @@ def settings(request): 'form': form, } - return render(request, 'patchwork/mail-form.html', context) + return render(request, 'patchwork/mail.html', context) def optout_confirm(request, conf): diff --git a/patchwork/views/user.py b/patchwork/views/user.py index 838a1abc..f3d8ae36 100644 --- a/patchwork/views/user.py +++ b/patchwork/views/user.py @@ -69,7 +69,7 @@ def register(request): context['form'] = form - return render(request, 'patchwork/registration_form.html', context) + return render(request, 'patchwork/registration.html', context) def register_confirm(request, conf):