Add the messaging app. Fixes #8
This commit is contained in:
@@ -132,6 +132,7 @@ INSTALLED_APPS = (
|
||||
'minecraft',
|
||||
'petition',
|
||||
'local',
|
||||
'messages',
|
||||
# Uncomment the next line to enable admin documentation:
|
||||
# 'django.contrib.admindocs',
|
||||
)
|
||||
|
@@ -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;
|
||||
}
|
||||
|
@@ -18,6 +18,8 @@
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
</ul>
|
||||
{% block sidebar %}
|
||||
{% endblock %}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
@@ -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 %}
|
||||
|
25
templates/messages/base.html
Normal file
25
templates/messages/base.html
Normal 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 %}
|
13
templates/messages/compose.html
Normal file
13
templates/messages/compose.html
Normal 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" %} »"/>
|
||||
</form>
|
||||
|
||||
{% endblock %}
|
1
urls.py
1
urls.py
@@ -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')),
|
||||
|
Reference in New Issue
Block a user