[PATCH 2/6] templates: Rename additional templates

Stephen Finucane stephen at that.guru
Tue Sep 18 00:17:46 AEST 2018


Make ALL the things consistent.

Signed-off-by: Stephen Finucane <stephen at that.guru>
---
 .../{download_buttons.html => download-buttons.html}          | 0
 patchwork/templates/patchwork/{mail-form.html => mail.html}   | 0
 .../patchwork/{registration_form.html => registration.html}   | 0
 patchwork/templates/patchwork/submission.html                 | 4 ++--
 patchwork/tests/test_mail_settings.py                         | 4 ++--
 patchwork/tests/test_registration.py                          | 2 +-
 patchwork/views/mail.py                                       | 2 +-
 patchwork/views/user.py                                       | 2 +-
 8 files changed, 7 insertions(+), 7 deletions(-)
 rename patchwork/templates/patchwork/{download_buttons.html => download-buttons.html} (100%)
 rename patchwork/templates/patchwork/{mail-form.html => mail.html} (100%)
 rename patchwork/templates/patchwork/{registration_form.html => registration.html} (100%)

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)
 </script>
 
 <h1>{{ submission.name }}
-{% include "patchwork/download_buttons.html" %}
+{% include "patchwork/download-buttons.html" %}
 </h1>
 
 <table class="patchmeta">
@@ -285,7 +285,7 @@ function toggle_div(link_id, headers_id)
 {% if submission.diff %}
 <h2>
  Patch
- {% include "patchwork/download_buttons.html" %}
+ {% include "patchwork/download-buttons.html" %}
 </h2>
 
 <div id="patch" class="patch">
diff --git a/patchwork/tests/test_mail_settings.py b/patchwork/tests/test_mail_settings.py
index 6d56f5a8..70e135d5 100644
--- a/patchwork/tests/test_mail_settings.py
+++ b/patchwork/tests/test_mail_settings.py
@@ -46,14 +46,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 616254d2..ad8ead23 100644
--- a/patchwork/tests/test_registration.py
+++ b/patchwork/tests/test_registration.py
@@ -55,7 +55,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 45283eba..12825a13 100644
--- a/patchwork/views/mail.py
+++ b/patchwork/views/mail.py
@@ -48,7 +48,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 848f86e5..cb8e61af 100644
--- a/patchwork/views/user.py
+++ b/patchwork/views/user.py
@@ -82,7 +82,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):
-- 
2.17.1



More information about the Patchwork mailing list