Integrate flatpages app
This commit is contained in:
@@ -101,6 +101,7 @@ MIDDLEWARE_CLASSES = (
|
||||
'django.middleware.csrf.CsrfViewMiddleware',
|
||||
'django.contrib.auth.middleware.AuthenticationMiddleware',
|
||||
'django.contrib.messages.middleware.MessageMiddleware',
|
||||
'django.contrib.flatpages.middleware.FlatpageFallbackMiddleware',
|
||||
)
|
||||
|
||||
ROOT_URLCONF = 'caminus.urls'
|
||||
@@ -129,6 +130,7 @@ INSTALLED_APPS = (
|
||||
'south',
|
||||
'news',
|
||||
'django.contrib.comments',
|
||||
'django.contrib.flatpages',
|
||||
'minecraft'
|
||||
# Uncomment the next line to enable admin documentation:
|
||||
# 'django.contrib.admindocs',
|
||||
|
@@ -1,5 +1,6 @@
|
||||
{%load static %}
|
||||
{% load cache %}
|
||||
{% load flatpages %}
|
||||
{% get_static_prefix as STATIC_PREFIX %}
|
||||
<html>
|
||||
<head>
|
||||
@@ -63,6 +64,10 @@
|
||||
<li><a href="/">Home</a></li>
|
||||
<li><a href="{%url forums.views.index%}">Forums</a></li>
|
||||
<li><a href="http://{{minecraftHost}}/map/">Live Map</a></li>
|
||||
{% get_flatpages '/' as pages %}
|
||||
{% for page in pages %}
|
||||
<li><a href="{{ page.url }}">{{ page.title }}</a></li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
<br style="clear:both"/>
|
||||
</div>
|
||||
|
8
templates/flatpages/default.html
Normal file
8
templates/flatpages/default.html
Normal file
@@ -0,0 +1,8 @@
|
||||
{% extends 'base.html' %}
|
||||
{% load markup %}
|
||||
|
||||
{% block title %}{{flatpage.title}}{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
{{flatpage.content|markdown}}
|
||||
{% endblock %}
|
Reference in New Issue
Block a user