Integrate flatpages app

This commit is contained in:
Trever Fischer
2012-02-25 14:12:57 -05:00
parent 0d6056d168
commit ee82cd40cb
3 changed files with 15 additions and 0 deletions

View File

@@ -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',

View File

@@ -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>

View File

@@ -0,0 +1,8 @@
{% extends 'base.html' %}
{% load markup %}
{% block title %}{{flatpage.title}}{% endblock %}
{% block content %}
{{flatpage.content|markdown}}
{% endblock %}