Created a stupid flatpage view and urlpattern.
This commit is contained in:
		@@ -48,7 +48,7 @@
 | 
			
		||||
                <nav class="LP-Menu LP-Menu--sidebar">
 | 
			
		||||
                    <ul class="LP-Menu__List">
 | 
			
		||||
                        <li class="LP-Menu__Item"><a href="/" class="LP-Link"><span class="LP-Link__Text">Home</span></a></li>
 | 
			
		||||
                        <li class="LP-Menu__Item"><a href="{% url 'codex' %}" class="LP-Link"><span class="LP-Link__Text">UrBex codex</span></a></li>
 | 
			
		||||
                        <li class="LP-Menu__Item"><a href="{% url 'flatpage' slug='codex' %}" class="LP-Link"><span class="LP-Link__Text">UrBex codex</span></a></li>
 | 
			
		||||
                        
 | 
			
		||||
                        {% block additional_menu_items %}
 | 
			
		||||
                        {% endblock additional_menu_items %}
 | 
			
		||||
 
 | 
			
		||||
@@ -64,9 +64,9 @@
 | 
			
		||||
            and <a href="https://www.commander1024.de" class="LP-Footer__GenericAnchor">Commander1024.</a></span>
 | 
			
		||||
        </div>
 | 
			
		||||
        <div class="LP-Footer__BottomWrapper">
 | 
			
		||||
            <a href='flat/privacy-policy/' class="LP-Footer__GenericAnchor">Privacy Policy</a>
 | 
			
		||||
            <a href='{% url 'flatpage' slug='privacy-policy' %}' class="LP-Footer__GenericAnchor">Privacy Policy</a>
 | 
			
		||||
            |
 | 
			
		||||
            <a href='flat/impress/' class="LP-Footer__GenericAnchor">Impress</a>
 | 
			
		||||
            <a href='{% url 'flatpage' slug='impress' %}' class="LP-Footer__GenericAnchor">Impress</a>
 | 
			
		||||
        </div>
 | 
			
		||||
    </section>
 | 
			
		||||
</footer>
 | 
			
		||||
 
 | 
			
		||||
@@ -9,7 +9,7 @@ from .views import (
 | 
			
		||||
    PlaceDeleteView,
 | 
			
		||||
	PhotoAlbumCreateView,
 | 
			
		||||
	PhotoAlbumDeleteView,
 | 
			
		||||
    CodexView
 | 
			
		||||
    FlatView
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
urlpatterns = [
 | 
			
		||||
@@ -22,5 +22,5 @@ urlpatterns = [
 | 
			
		||||
    path('place/update/<int:pk>/', PlaceUpdateView.as_view(), name='place_edit'),
 | 
			
		||||
    path('place/delete/<int:pk>/', PlaceDeleteView.as_view(), name='place_delete'),
 | 
			
		||||
    path('place/', PlaceListView.as_view(), name='place_list'),
 | 
			
		||||
    path('codex/', CodexView, name='codex'),
 | 
			
		||||
    path('flat/<slug:slug>/', FlatView, name='flatpage')
 | 
			
		||||
]
 | 
			
		||||
 
 | 
			
		||||
@@ -4,7 +4,7 @@ from django.views.generic.edit import CreateView
 | 
			
		||||
from django.contrib.messages.views import SuccessMessageMixin
 | 
			
		||||
from django.contrib import messages
 | 
			
		||||
from django.urls import reverse_lazy
 | 
			
		||||
from django.shortcuts import render, redirect
 | 
			
		||||
from django.shortcuts import render, redirect, get_object_or_404
 | 
			
		||||
 | 
			
		||||
from lostplaces_app.forms import ExplorerCreationForm
 | 
			
		||||
from lostplaces_app.models import Place, PhotoAlbum
 | 
			
		||||
@@ -49,5 +49,5 @@ class PhotoAlbumDeleteView(PlaceAssetDeleteView):
 | 
			
		||||
    success_message = 'Photo Album deleted'
 | 
			
		||||
    permission_denied_messsage = 'You do not have permissions to alter this photo album'
 | 
			
		||||
 | 
			
		||||
def CodexView(request):
 | 
			
		||||
    return render(request, 'flat/codex.html')
 | 
			
		||||
def FlatView(request, slug):
 | 
			
		||||
    return render(request, 'flat/' + slug + '.html')
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user