From b4552b9c15cfefdb135a11f119420d6d9badd673 Mon Sep 17 00:00:00 2001 From: Jelle van der Waa Date: Sat, 9 Feb 2019 20:38:19 +0100 Subject: flag: move inline css to a separate file CSP dissalows inline CSS styles so move the CSS to a separate file. --- packages/tests.py | 4 ++++ sitestatic/flaghelp.css | 4 ++++ templates/packages/flaghelp.html | 7 +------ 3 files changed, 9 insertions(+), 6 deletions(-) create mode 100644 sitestatic/flaghelp.css diff --git a/packages/tests.py b/packages/tests.py index fecf27b6..30185081 100644 --- a/packages/tests.py +++ b/packages/tests.py @@ -307,6 +307,10 @@ class FlagPackage(TestCase): self.assertIn('Enter a valid and useful out-of-date message', response.content.decode()) self.assertEqual(len(mail.outbox), 0) + def test_flag_help(self): + response = self.client.get('/packages/flaghelp/') + self.assertEqual(response.status_code, 200) + class UnFlagPackage(TransactionTestCase): fixtures = ['main/fixtures/arches.json', 'main/fixtures/repos.json', diff --git a/sitestatic/flaghelp.css b/sitestatic/flaghelp.css new file mode 100644 index 00000000..f02bad0a --- /dev/null +++ b/sitestatic/flaghelp.css @@ -0,0 +1,4 @@ +body { background: #f6f9fc; color: #222; font-family: sans-serif; } +a:link { text-decoration: none; color: #07b; } +a:visited { color: #666; } +a:hover { text-decoration: underline; color: #666; } diff --git a/templates/packages/flaghelp.html b/templates/packages/flaghelp.html index c6860264..579d3a1e 100644 --- a/templates/packages/flaghelp.html +++ b/templates/packages/flaghelp.html @@ -5,12 +5,7 @@ - +

Flagging Packages

-- cgit v1.2.3-55-g3dc8