Implement petition app

This commit is contained in:
Trever Fischer
2012-03-02 11:45:57 -05:00
parent 5194d95d75
commit 171bca132d
13 changed files with 149 additions and 1 deletions

View File

@@ -65,6 +65,7 @@
<ul>
<li><a href="/">Home</a></li>
<li><a href="{%url forums.views.index%}">Forums</a></li>
<li><a href="{% url petition.views.create %}">Create Petition</a></li>
<li><a href="http://{{minecraftHost}}/map/">Live Map</a></li>
{% get_flatpages '/' as pages %}
{% for page in pages %}

View File

@@ -0,0 +1,18 @@
{% extends 'base.html' %}
{% block title %}New Petition{% endblock %}
{% block content %}
<p>Creating a petition notifies the administration. Possible uses:</p>
<ul>
<li>Abusive player</li>
<li>Server bug</li>
<li>Feature request</li>
</ul>
<form method="POST" action="{% url petition.views.create %}">
{% csrf_token %}
{{form.as_p}}
<input type="submit" value="Submit"/>
</form>
{% endblock %}

View File

@@ -0,0 +1,20 @@
{% extends 'base.html' %}
{% load markup %}
{% block title %}Petition #{{petition.id}}{% endblock %}
{% block content %}
<p>Created by {{petition.author}}</p>
{{petition.body|markdown:"safe"}}
{% for comment in petition.comment_set.all %}
<p>By {{comment.author}}</p>
{{comment.body|markdown:"safe"}}
{% endfor %}
<form method="POST" action="{% url petition.views.comment id=petition.id %}">
{% csrf_token %}
{{form.as_p}}
<input type="submit" value="Submit"/>
</form>
{% endblock %}