Enable flatpages

This commit is contained in:
James Polley 2017-10-16 21:53:18 +11:00
parent 79310913ad
commit bfa94b8c5e
3 changed files with 11 additions and 0 deletions

View file

@ -158,6 +158,7 @@ MIDDLEWARE_CLASSES = [
"debug_toolbar.middleware.DebugToolbarMiddleware",
"reversion.middleware.RevisionMiddleware",
"django.middleware.clickjacking.XFrameOptionsMiddleware",
"django.contrib.flatpages.middleware.FlatpageFallbackMiddleware",
'pinaxcon.monkey_patch.MonkeyPatchMiddleware',
]
@ -170,6 +171,7 @@ INSTALLED_APPS = [
"django.contrib.admin",
"django.contrib.auth",
"django.contrib.contenttypes",
"django.contrib.flatpages",
"django.contrib.messages",
"django.contrib.sessions",
"django.contrib.sites",

View file

@ -0,0 +1,6 @@
{% extends "utility_page.html" %}
{% block content %}
{{ flatpage.content }}
{% endblock content %}

View file

@ -3,6 +3,7 @@ from django.conf.urls import include, url
from django.conf.urls.static import static
from django.views.generic import RedirectView
from django.views.generic import TemplateView
from django.contrib.flatpages.views import flatpage
from django.contrib import admin
@ -26,6 +27,8 @@ urlpatterns = [
url(r'^tickets/', include('registrasion.urls')),
url(r'^nested_admin/', include('nested_admin.urls')),
url(r'^pages/', include('django.contrib.flatpages.urls')),
url(r'^dashboard/', RedirectView.as_view(url='/')),
url(r'^$', symposion.views.dashboard, name="dashboard"),