diff --git a/core/views_expo.py b/core/views_expo.py index d43cf19..fb4c06c 100644 --- a/core/views_expo.py +++ b/core/views_expo.py @@ -55,7 +55,7 @@ def expofilesdir(request, dirpath, filepath): fileitems.append((Path(urlpath) / f.parts[-1], str(f.parts[-1]), getmimetype(f))) return render(request, 'dirdisplay.html', { 'filepath': urlpath, 'fileitems':fileitems, 'diritems': diritems,'settings': settings }) -def flatpage(request, path): +def expopage(request, path): '''Either renders an HTML page from expoweb with all the menus, or serves an unadorned binary file with mime type @@ -174,7 +174,7 @@ def getmimetype(path): @login_required_if_public @ensure_csrf_cookie -def editflatpage(request, path): +def editexpopage(request, path): try: r = Cave.objects.get(url = path) return troggle.core.views_caves.editCave(request, r.cave.slug) @@ -241,7 +241,7 @@ def editflatpage(request, path): else: body = "### File not found ###\n" + str(filepath) flatpageForm = FlatPageForm({"html": body, "title": "Missing"}) - return render(request, 'editflatpage.html', {'path': path, 'form': flatpageForm, }) + return render(request, 'editexpopage.html', {'path': path, 'form': flatpageForm, }) class FlatPageForm(forms.Form): title = forms.CharField(widget=forms.TextInput(attrs={'size':'60'})) diff --git a/templates/editflatpage.html b/templates/editexpopage.html similarity index 100% rename from templates/editflatpage.html rename to templates/editexpopage.html diff --git a/templates/flatpage.html b/templates/flatpage.html index ebe5b1b..cf6d860 100644 --- a/templates/flatpage.html +++ b/templates/flatpage.html @@ -5,7 +5,7 @@ {{ body|safe }} {% if homepage %} {% if editable %} - Edit + Edit {% endif %} {% else %} {% if not has_menu %} diff --git a/templates/menu.html b/templates/menu.html index e36136f..f9fdf4c 100644 --- a/templates/menu.html +++ b/templates/menu.html @@ -3,7 +3,7 @@
Probably a mistake. But you can use this link +
Probably a mistake. But you can use this link
or 'Edit this page' in the menu on the left to create this page if you aare logged in.
If you can't see that option in the menu, then you are not logged in and you can't create anything.
diff --git a/urls.py b/urls.py
index 2297535..79651c3 100644
--- a/urls.py
+++ b/urls.py
@@ -10,7 +10,7 @@ from troggle.core import views_other, views_caves, views_logbooks, views_statist
from troggle.core.views_other import troggle404
from troggle.core.views_caves import ent, prospecting_image
from troggle.core.views_statistics import pathsreport, stats
-from troggle.core.views_expo import expofiles_redirect, expofilessingle, flatpage, editflatpage
+from troggle.core.views_expo import expofiles_redirect, expofilessingle, expopage, editexpopage
"""This sets the actualurlpatterns[] and urlpatterns[] lists which django uses
to resolve urls - in both directions as these are declarative.
@@ -33,16 +33,16 @@ The API urls return TSV or JSON and are new in July 2020.
if settings.EXPOFILESREMOTE:
expofilesurls = [
- url(r'^/*(?P