]> git.ipfire.org Git - thirdparty/patchwork.git/commitdiff
templates: Rename additional templates
authorStephen Finucane <stephen@that.guru>
Wed, 6 Jun 2018 14:45:18 +0000 (15:45 +0100)
committerStephen Finucane <stephen@that.guru>
Sat, 29 Sep 2018 21:41:16 +0000 (22:41 +0100)
Make ALL the things consistent.

Signed-off-by: Stephen Finucane <stephen@that.guru>
patchwork/templates/patchwork/download-buttons.html [moved from patchwork/templates/patchwork/download_buttons.html with 100% similarity]
patchwork/templates/patchwork/mail.html [moved from patchwork/templates/patchwork/mail-form.html with 100% similarity]
patchwork/templates/patchwork/registration.html [moved from patchwork/templates/patchwork/registration_form.html with 100% similarity]
patchwork/templates/patchwork/submission.html
patchwork/tests/test_mail_settings.py
patchwork/tests/test_registration.py
patchwork/views/mail.py
patchwork/views/user.py

index f03e14084b3634c0ab669aeede0ec71ae4ce3b86..6e189b27359ac67a6feec8d839da28d9a57b98c5 100644 (file)
@@ -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">
index 2c8266924a1da6f0051be1ffdd776cb5845d5d60..34b3f8685f6edea77501a9bd0d90bc74f770cd69 100644 (file)
@@ -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):
index 5e7a49dbbaf8235a7de69cc85ead85307ab34aa3..6e74d98fc372e9cee7c282768e37f4ad0ba1b36d 100644 (file)
@@ -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']:
index f6bdbb47b5730f69000b32c38e1e5656d8f6dfdd..280f4e8cfb07b4f7675e836e49344602fb4b77b0 100644 (file)
@@ -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):
index 838a1abca60bc70a57c95e98510848d04df72dc2..f3d8ae36dc4c7e8e6a02f1aa25518569b95b5578 100644 (file)
@@ -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):