From 3e50d0edcaec0871d6e6bb3c05c694b2ed1628bc Mon Sep 17 00:00:00 2001 From: Philip Sargent Date: Thu, 15 Apr 2021 12:34:51 +0100 Subject: [PATCH] renaming CSS files for clarity --- core/TESTS/tests.py | 4 ++-- core/admin.py | 6 +++--- media/css/{main2.css => main2-redundant.css} | 0 media/css/{main3.css => trog3.css} | 2 +- templates/base.html | 2 +- 5 files changed, 7 insertions(+), 7 deletions(-) rename media/css/{main2.css => main2-redundant.css} (100%) rename media/css/{main3.css => trog3.css} (93%) diff --git a/core/TESTS/tests.py b/core/TESTS/tests.py index 11f3bc4..946d579 100644 --- a/core/TESTS/tests.py +++ b/core/TESTS/tests.py @@ -289,13 +289,13 @@ class PageTests(TestCase): def test_page_site_media_css(self): # Flat file tests. - response = self.client.get('/site_media/css/main3.css') + response = self.client.get('/site_media/css/trog3.css') if response.status_code != 200: self.assertEqual(response.status_code, 302) if response.status_code != 302: self.assertEqual(response.status_code, 200) content = response.content.decode() # need to check it is not just an error page - ph = r'This text is used by the test system to determine that main3.css loaded correctly' + ph = r'This text is used by the test system to determine that trog3.css loaded correctly' phmatch = re.search(ph, content) self.assertIsNotNone(phmatch, "Failed to find expected text: '" + ph +"'") diff --git a/core/admin.py b/core/admin.py index 0e69527..c71f4f6 100644 --- a/core/admin.py +++ b/core/admin.py @@ -61,16 +61,16 @@ class LogbookEntryAdmin(TroggleModelAdmin): inlines = (PersonTripInline, QMsFoundInline) class Media: css = { - "all": ("css/troggleadmin.css",) + "all": ("css/troggleadmin.css",) # this does not exist } actions=('export_logbook_entries_as_html','export_logbook_entries_as_txt') def export_logbook_entries_as_html(self, modeladmin, request, queryset): - response=downloadLogbook(request=request, queryset=queryset, extension='html') + response=downloadLogbook(request=request, queryset=queryset, extension='html') #fails, no queryset return response def export_logbook_entries_as_txt(self, modeladmin, request, queryset): - response=downloadLogbook(request=request, queryset=queryset, extension='txt') + response=downloadLogbook(request=request, queryset=queryset, extension='txt') #fails, no queryset return response diff --git a/media/css/main2.css b/media/css/main2-redundant.css similarity index 100% rename from media/css/main2.css rename to media/css/main2-redundant.css diff --git a/media/css/main3.css b/media/css/trog3.css similarity index 93% rename from media/css/main3.css rename to media/css/trog3.css index f139a3e..ad33b47 100644 --- a/media/css/main3.css +++ b/media/css/trog3.css @@ -2,7 +2,7 @@ html, body { height: 100%; } -/* This text is used by the test system to determine that main3.css loaded correctly */ +/* This text is used by the test system to determine that trog3.css loaded correctly */ .caption { font-size: 8pt; margin-bottom: 0pt; } .centre { text-align: center; } .plus2pt { font-size: 160%; } diff --git a/templates/base.html b/templates/base.html index 57e20e8..3dd2fa1 100644 --- a/templates/base.html +++ b/templates/base.html @@ -2,7 +2,7 @@ - + {% block title %}Troggle{% endblock %}