Add the messaging app. Fixes #8

This commit is contained in:
Trever Fischer
2012-03-08 09:04:43 -05:00
parent 9ca328dd75
commit 77314a81e7
7 changed files with 59 additions and 3 deletions

View File

@@ -132,6 +132,7 @@ INSTALLED_APPS = (
'minecraft',
'petition',
'local',
'messages',
# Uncomment the next line to enable admin documentation:
# 'django.contrib.admindocs',
)

View File

@@ -116,16 +116,16 @@ td {
padding: 0.5em;
}
tr.header {
thead tr, tr.header {
background-color: #aaa;
color: #000;
}
tr.even {
tbody tr:nth-child(even) {
background-color:#444;
}
tr.odd {
tbody tr:nth-child(odd) {
background-color:#222;
}
@@ -262,3 +262,16 @@ tr.sticky a:link {
font-size:large;
text-decoration: none;
}
#localnav {
border: 2px solid black;
margin-bottom: 1em;
}
#localnav ul {
list-style: none;
}
#localnav ul li {
float: left;
}

View File

@@ -18,6 +18,8 @@
{% endif %}
{% endfor %}
</ul>
{% block sidebar %}
{% endblock %}
</div>
</div>

View File

@@ -46,6 +46,7 @@
<ul>
<li><a href="{% url user_profile %}">Your Profile</a></li>
<li><a href="{% url django.contrib.auth.views.logout %}">Logout</a></li>
<li><a href="{% url messages.views.inbox %}">Mail</a></li>
{% if user.is_staff or user.is_superuser %}
<li><a href="{% url admin:index %}">Admin</a></li>
{% endif %}

View File

@@ -0,0 +1,25 @@
{% extends 'base.html' %}
{% block sectiontitle %}Mail{% endblock %}
{% block main %}
<div id="content">
<div class="grid_12">
<div id="localnav">
<ul>
<li><a href="{% url messages.views.compose %}">Compose</a></li>
<li><a href="{% url messages.views.inbox %}">Inbox</a></li>
<li><a href="{% url messages.views.outbox %}">Sent</a></li>
<li><a href="{% url messages.views.trash %}">Trash</a></li>
</ul>
</div>
</div>
<div class="grid_8">
<div class="item">
{% block content %}
{% endblock content%}
</diV>
</div>
</div>
{% include '_sidebar.html' %}
{% endblock %}

View File

@@ -0,0 +1,13 @@
{% extends "messages/base.html" %}
{% load i18n %}
{% block content %}
<h1>{% trans "Compose Message"%}</h1>
<form action="" method="post">
<table>
{% csrf_token %}
{{ form.as_table }}
</table>
<input type="submit" value="{% trans "Send" %} &raquo;"/>
</form>
{% endblock %}

View File

@@ -10,6 +10,7 @@ urlpatterns = patterns('',
url(r'^comments/', include('django.contrib.comments.urls')),
url(r'^news/', include('news.urls')),
url(r'^minecraft/', include('minecraft.urls')),
url(r'^mail/', include('messages.urls')),
url(r'^profiles/', include('profiles.urls')),
url(r'^accounts/logout', 'django.contrib.auth.views.logout', kwargs={'next_page':'/'}),
url(r'^accounts/', include('django.contrib.auth.urls')),