From a1f02e575f6c379fd1a66cbfdefe8b9f29800297 Mon Sep 17 00:00:00 2001 From: Sam Wenham Date: Sat, 23 Feb 2019 15:30:58 +0000 Subject: Prevent troggle adding the menu if there is one in the file Add a Docker compose file to bring up a dev troggle easily Various PEP improvments --- flatpages/views.py | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'flatpages/views.py') diff --git a/flatpages/views.py b/flatpages/views.py index 6503d40..672ec0c 100644 --- a/flatpages/views.py +++ b/flatpages/views.py @@ -35,7 +35,7 @@ def flatpage(request, path): if path.startswith("noinfo") and settings.PUBLIC_SITE and not request.user.is_authenticated(): - print "flat path noinfo", path + print("flat path noinfo", path) return HttpResponseRedirect(reverse("auth_login") + '?next=%s' % request.path) if path.endswith("/") or path == "": @@ -67,13 +67,15 @@ def flatpage(request, path): title, = m.groups() else: title = "" - linksmatch = re.match('(.*)