Implement petition app
This commit is contained in:
@@ -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 %}
|
||||
|
18
templates/petition/create.html
Normal file
18
templates/petition/create.html
Normal 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 %}
|
20
templates/petition/view.html
Normal file
20
templates/petition/view.html
Normal 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 %}
|
Reference in New Issue
Block a user