diff options
author | Philip Sargent <philip.sargent@klebos.com> | 2021-05-02 22:47:59 +0100 |
---|---|---|
committer | Philip Sargent <philip.sargent@klebos.com> | 2021-05-02 22:47:59 +0100 |
commit | 4782f3b184ffcabcb24661aa188c8a49ab3ae1fc (patch) | |
tree | 589edc9f9a744ddcbc2a1b44d5541616569396ac /core | |
parent | 51da26564fa85d5c615771a12f5595f94f56c517 (diff) | |
download | troggle-4782f3b184ffcabcb24661aa188c8a49ab3ae1fc.tar.gz troggle-4782f3b184ffcabcb24661aa188c8a49ab3ae1fc.tar.bz2 troggle-4782f3b184ffcabcb24661aa188c8a49ab3ae1fc.zip |
fixed test mistake & bug in Edit This
Diffstat (limited to 'core')
-rw-r--r-- | core/TESTS/tests_logins.py | 6 | ||||
-rw-r--r-- | core/views/expo.py | 4 |
2 files changed, 4 insertions, 6 deletions
diff --git a/core/TESTS/tests_logins.py b/core/TESTS/tests_logins.py index 0cbdad9..9148207 100644 --- a/core/TESTS/tests_logins.py +++ b/core/TESTS/tests_logins.py @@ -91,9 +91,9 @@ class PostTests(TestCase): content = response.content.decode() self.assertEqual(response.status_code, 200) self.assertEqual(response.status_code, HTTPStatus.OK) - with open('test_up.html', 'w') as f: - f.write(content) - t = re.search('<em>\'README', content) + # with open('test_up.html', 'w') as f: + # f.write(content) + t = re.search('<em>README', content) self.assertIsNotNone(t, 'Logged in but failed to see "<em>\'README"' ) t = re.search(' saved as', content) self.assertIsNotNone(t, 'Logged in but failed to see "File(s) saved as"' ) diff --git a/core/views/expo.py b/core/views/expo.py index b454df9..4b7e378 100644 --- a/core/views/expo.py +++ b/core/views/expo.py @@ -135,7 +135,7 @@ def expowebpage(request, expowebpath, path): title, = m.groups() else: title = "" - m = re.search(r"<meta([^>]*)noedit", head, re.DOTALL + re.IGNORECASE) + m = re.search(r"^<meta([^>]*)noedit", head, re.DOTALL + re.IGNORECASE) if m: editable = False else: @@ -325,6 +325,4 @@ class ExpoPageForm(forms.Form): '''The form used by the editexpopage function ''' title = forms.CharField(widget=forms.TextInput(attrs={'size':'60'})) - - #html = forms.CharField(widget=TinyMCE(attrs={'cols': 80, 'rows': 20})) html = forms.CharField(widget=forms.Textarea(attrs={"cols":80, "rows":20})) |