Commits

Sergey Maranchuk committed 07a9dad

update django-messages to 0.5pre; dont forget syncdb

  • Participants
  • Parent commits 6a3ccf8

Comments (0)

Files changed (15)

File basic_project/settings.py

     'django_authopenid',
     'djangobb_forum',
     'haystack',
-    'messages',
+    'django_messages',
 )
 
 # A sample logging configuration. The only tangible logging
     'django.core.context_processors.request',
     'django.contrib.messages.context_processors.messages',
     'django_authopenid.context_processors.authopenid',
-    'messages.context_processors.inbox',
+    'django_messages.context_processors.inbox',
     'djangobb_forum.context_processors.forum_settings',
 )
 

File basic_project/templates/django_messages/base_pm.html

+{% extends 'djangobb_forum/base.html' %}
+{% load forum_extras %}
+{% load i18n %}
+
+{% block content %}
+<div class="block2col">
+	{% include 'django_messages/menu_pm.html' %}
+	
+	{% block sub_content %}
+	{% endblock %}
+	
+<div class="clearer"></div>
+</div>
+{% endblock %}
+
+{% block controls %}
+{% endblock %}

File basic_project/templates/django_messages/compose.html

+{% extends 'django_messages/base_pm.html' %}
+{% load forum_extras %}
+{% load i18n %}
+
+{% block sub_content %}
+
+
+<div class="blockform">
+	<h2><span>{% trans "Send a message" %}</span></h2>
+	<div class="box">
+
+
+	<form action="" method="post">
+		{% csrf_token %}
+		<div class="inform">
+		<fieldset>
+			<legend>{% trans "Write your message and submit" %}</legend>
+
+			<div class="infldset txtarea">
+				{{ form.recipient.errors }}
+				<label ><strong>{{ form.recipient.label }}</strong><br />{{ form.recipient }}<br /></label>
+				{{ form.subject.errors }}
+				<label><strong>{{ form.subject.label }}</strong><br />{{ form.subject }}<br /></label>
+				{{ form.body.errors }}
+				<label><strong>{{ form.body.label }}</strong><br />
+				{{ form.body.errors }}
+				{{ form.body }}<br /></label>
+			</div>
+		</fieldset>
+			</div>
+			<p><input type="submit" name="submit" value="{% trans "Send" %}" tabindex="6" accesskey="s" /><a href="javascript:history.go(-1)">{% trans "Go back" %}</a></p>
+
+		</form>
+	</div>
+</div>
+
+{% endblock %}
+

File basic_project/templates/django_messages/inbox.html

+{% extends 'django_messages/base_pm.html' %}
+{% load forum_extras %}
+{% load i18n %}
+{% block sub_content %}
+ <div class="blockform">
+	<h2><span>{% trans "Inbox" %}</span></h2>
+	<div class="box">
+		<div class="inbox">
+			<table cellspacing="0">
+			<thead>
+				<tr>
+					<th class="tcl">{% trans "Subject" %}</th>
+					<th>{% trans "Sender" %}</th>
+					<th class="tcr">{% trans "Date" %}</th>
+				</tr>
+			</thead>
+			<tbody>
+			{% if message_list %}
+				{% for msg in message_list %}
+				<tr {% if msg.new %}class="inew"{% endif %}>
+					<td class="tcl">
+						<div class="intd">
+							<div class="icon"><div class="nosize"><!-- --></div></div>
+							<div class="tclcon">
+								{% if msg.new %}
+									<strong><a href="{% url messages_detail msg.id %}">{{ msg.subject }}</a></strong>
+								{% else %}
+									<a href="{% url messages_detail msg.id %}">{{ msg.subject }}</a>
+								{% endif %}
+							</div>
+						</div>
+					</td>
+					<td class="tc2" style="white-space: nowrap; OVERFLOW: hidden"><a href="{% url djangobb:forum_profile msg.sender.username %}">{{ msg.sender.username }}</a></td>
+					<td class="tcr" style="white-space: nowrap">{% forum_time msg.sent_at %}</td>
+				</tr>
+				{% endfor %}
+			{% else %}
+				<tr><td class="djangobbcon1" colspan="3">{% trans "No messages" %}</td></tr>
+			{% endif %}
+			</tbody>
+			</table>
+		</div>
+	</div>
+</div>
+{% endblock %}

File basic_project/templates/django_messages/menu_pm.html

+{% load i18n %}
+	<div class="blockmenu">
+		<h2><span>{% trans "Private Messages" %}</span></h2>
+		<div class="box">
+			<div class="inbox">
+				<ul>
+					<li {% if active_menu == "inbox" %}class="isactive"{% endif %}><a href="{% url messages_inbox %}">{% trans "Inbox" %}</a></li>
+					<li {% if active_menu == "outbox" %}class="isactive"{% endif %}><a href="{% url messages_outbox %}">{% trans "Sent" %}</a></li>
+					<li {% if active_menu == "create" %}class="isactive"{% endif %}><a href="{% url messages_compose %}">{% trans "Send new message" %}</a></li>
+				</ul>
+			</div>
+		</div>
+
+	</div>

File basic_project/templates/django_messages/outbox.html

+{% extends 'django_messages/base_pm.html' %}
+{% load forum_extras %}
+{% load i18n %}
+{% block sub_content %}
+ <div class="blockform">
+	<h2><span>{% trans "Outbox" %}</span></h2>
+	<div class="box">
+		<div class="inbox">
+			<table cellspacing="0">
+			<thead>
+				<tr>
+					<th class="tcl">{% trans "Subject" %}</th>
+					<th>{% trans "Receiver" %}</th>
+					<th class="tcr">{% trans "Date" %}</th>
+				</tr>
+			</thead>
+			<tbody>
+			{% if message_list %}
+				{% for msg in message_list %}
+				<tr>
+					<td class="tcl">
+						<div class="intd">
+							<div class="icon"><div class="nosize"><!-- --></div></div>
+							<div class="tclcon">
+								<a href="{% url messages_detail msg.id %}">{{ msg.subject }}</a>
+							</div>
+						</div>
+					</td>
+					<td class="tc2" style="white-space: nowrap; OVERFLOW: hidden"><a href="{% url djangobb:forum_profile msg.recipient %}">{{ msg.recipient }}</a></td>
+					<td class="tcr" style="white-space: nowrap">{% forum_time msg.sent_at %}</td>
+				</tr>
+				{% endfor %}
+			{% else %}
+				<tr><td class="djangobbcon1" colspan="3">{% trans "No messages" %}</td></tr>
+			{% endif %}
+			</tbody>
+			</table>
+		</div>
+	</div>
+</div>
+{% endblock %}

File basic_project/templates/django_messages/view.html

+{% extends 'django_messages/base_pm.html' %}
+{% load forum_extras %}
+{% load i18n %}
+
+{% block sub_content %}
+
+<div id="p2" class="blockpost row_odd firstpost" style="margin-left: 14em;">
+		<h2><span>{% forum_time message.sent_at %}</span></h2>
+		<div class="box">
+			<div class="inbox">
+				<div class="postleft">
+					<dl>
+						<dt><strong>{{ message.sender|profile_link }}</strong></dt>
+						<dd>
+						{% if message.sender.forum_profile.status %}
+							<strong>{{ message.sender.forum_profile.status }}</strong>
+						{% else %}
+							<strong>{{ message.sender.forum_profile.group }}</strong>
+						{% endif %}
+						</dd>
+						{% if forum_settings.AUTHORITY_SUPPORT %}
+							<dd class="usertitle">
+							{{ message.sender|forum_authority }}
+							</dd>
+						{% endif %}
+						{% if message.sender.forum_profile.avatar and message.sender.forum_profile.show_avatar %}
+							<dd class="postavatar"><img src="{{ message.sender.forum_profile.avatar.url }}" /></dd>
+						{% else %}
+							<dd class="postavatar"><img src="{% gravatar message.sender.email %}" /></dd>
+						{% endif %}
+						<dd>{% trans "Registered:" %} {{ message.sender.date_joined|date:"Y-m-d" }}</dd>
+						<dd>{% trans "Posts:" %} {{ message.sender.posts.count }}</dd>
+						{% if moderator %}
+							<dd>{% trans "IP:" %} {{ post_user_ip }}</dd>
+						{% endif %}
+						<dd class="usercontacts"><a href="{% url djangobb:forum_profile message.sender %}">{% trans "Profile" %}</a>&nbsp;&nbsp;
+						{% if message.sender.forum_profile.privacy_permission == 0 %}
+							<a href="mailto:{{ message.sender.email }}">{% trans "E-mail" %}</a>&nbsp;&nbsp;
+						{% else %}
+							{% if message.sender.forum_profile.privacy_permission == 1 %}
+									<a href="{% url djangobb:misc %}?mail_to={{ message.sender }}">{% trans "Send e-mail" %}</a>&nbsp;&nbsp;
+							{% endif %}
+						{% endif %}
+						{% if user_is_authenticated %}
+							<a href="{% url messages_reply %}?recipient={{ post_user.username }}">{% trans "PM" %}</a>&nbsp;&nbsp;</dd>
+						{% endif %}
+					</dl>
+				</div>
+				<div class="postright">
+					<div class="postmsg">
+						{{ message.body|linebreaksbr }}
+						{% if not user.is_authenticated or user.forum_profile.show_signatures %}
+                    	{% if message.sender.forum_profile.signature %}
+                    	<div class="postsignature">
+                    		<br>
+                    		---
+							<br>
+                    		{{ message.sender.forum_profile.signature|safe }}
+                    	</div>
+                    {% endif %}
+                    {% endif %}
+					</div>
+					</div>
+				<div class="clearer"></div>
+				<div class="postfootleft">
+				{% if message.sender|online %}
+					<p><strong>{% trans "Online" %}</strong></p>
+				{% else %}
+					<p>{% trans "Offline" %}</p>
+				{% endif %}
+				</div>
+				<div class="postfootright">
+					<ul>
+						<li>
+							<a onclick="return confirm('{% trans "Are you sure you want to delete this post?" %}')" href="{% url messages_delete message.id %}">{% trans "Delete" %}</a>
+						</li>
+						<li>
+							| <a href="{% url messages_reply message.id %}">{% trans "Reply" %}</a>
+						</li>
+					</ul>
+				</div>
+			</div>
+		</div>
+	</div>
+{% endblock %}

File basic_project/templates/messages/base_pm.html

-{% extends 'djangobb_forum/base.html' %}
-{% load forum_extras %}
-{% load i18n %}
-
-{% block content %}
-<div class="block2col">
-	{% include 'messages/menu_pm.html' %}
-	
-	{% block sub_content %}
-	{% endblock %}
-	
-<div class="clearer"></div>
-</div>
-{% endblock %}
-
-{% block controls %}
-{% endblock %}

File basic_project/templates/messages/compose.html

-{% extends 'messages/base_pm.html' %}
-{% load forum_extras %}
-{% load i18n %}
-
-{% block sub_content %}
-
-
-<div class="blockform">
-	<h2><span>{% trans "Send a message" %}</span></h2>
-	<div class="box">
-
-
-	<form action="" method="post">
-		{% csrf_token %}
-		<div class="inform">
-		<fieldset>
-			<legend>{% trans "Write your message and submit" %}</legend>
-
-			<div class="infldset txtarea">
-				{{ form.recipient.errors }}
-				<label ><strong>{{ form.recipient.label }}</strong><br />{{ form.recipient }}<br /></label>
-				{{ form.subject.errors }}
-				<label><strong>{{ form.subject.label }}</strong><br />{{ form.subject }}<br /></label>
-				{{ form.body.errors }}
-				<label><strong>{{ form.body.label }}</strong><br />
-				{{ form.body.errors }}
-				{{ form.body }}<br /></label>
-			</div>
-		</fieldset>
-			</div>
-			<p><input type="submit" name="submit" value="{% trans "Send" %}" tabindex="6" accesskey="s" /><a href="javascript:history.go(-1)">{% trans "Go back" %}</a></p>
-
-		</form>
-	</div>
-</div>
-
-{% endblock %}
-

File basic_project/templates/messages/inbox.html

-{% extends 'messages/base_pm.html' %}
-{% load forum_extras %}
-{% load i18n %}
-{% block sub_content %}
- <div class="blockform">
-	<h2><span>{% trans "Inbox" %}</span></h2>
-	<div class="box">
-		<div class="inbox">
-			<table cellspacing="0">
-			<thead>
-				<tr>
-					<th class="tcl">{% trans "Subject" %}</th>
-					<th>{% trans "Sender" %}</th>
-					<th class="tcr">{% trans "Date" %}</th>
-				</tr>
-			</thead>
-			<tbody>
-			{% if message_list %}
-				{% for msg in message_list %}
-				<tr {% if msg.new %}class="inew"{% endif %}>
-					<td class="tcl">
-						<div class="intd">
-							<div class="icon"><div class="nosize"><!-- --></div></div>
-							<div class="tclcon">
-								{% if msg.new %}
-									<strong><a href="{% url messages_detail msg.id %}">{{ msg.subject }}</a></strong>
-								{% else %}
-									<a href="{% url messages_detail msg.id %}">{{ msg.subject }}</a>
-								{% endif %}
-							</div>
-						</div>
-					</td>
-					<td class="tc2" style="white-space: nowrap; OVERFLOW: hidden"><a href="{% url djangobb:forum_profile msg.sender.username %}">{{ msg.sender.username }}</a></td>
-					<td class="tcr" style="white-space: nowrap">{% forum_time msg.sent_at %}</td>
-				</tr>
-				{% endfor %}
-			{% else %}
-				<tr><td class="djangobbcon1" colspan="3">{% trans "No messages" %}</td></tr>
-			{% endif %}
-			</tbody>
-			</table>
-		</div>
-	</div>
-</div>
-{% endblock %}

File basic_project/templates/messages/menu_pm.html

-{% load i18n %}
-	<div class="blockmenu">
-		<h2><span>{% trans "Private Messages" %}</span></h2>
-		<div class="box">
-			<div class="inbox">
-				<ul>
-					<li {% if active_menu == "inbox" %}class="isactive"{% endif %}><a href="{% url messages_inbox %}">{% trans "Inbox" %}</a></li>
-					<li {% if active_menu == "outbox" %}class="isactive"{% endif %}><a href="{% url messages_outbox %}">{% trans "Sent" %}</a></li>
-					<li {% if active_menu == "create" %}class="isactive"{% endif %}><a href="{% url messages_compose %}">{% trans "Send new message" %}</a></li>
-				</ul>
-			</div>
-		</div>
-
-	</div>

File basic_project/templates/messages/outbox.html

-{% extends 'messages/base_pm.html' %}
-{% load forum_extras %}
-{% load i18n %}
-{% block sub_content %}
- <div class="blockform">
-	<h2><span>{% trans "Outbox" %}</span></h2>
-	<div class="box">
-		<div class="inbox">
-			<table cellspacing="0">
-			<thead>
-				<tr>
-					<th class="tcl">{% trans "Subject" %}</th>
-					<th>{% trans "Receiver" %}</th>
-					<th class="tcr">{% trans "Date" %}</th>
-				</tr>
-			</thead>
-			<tbody>
-			{% if message_list %}
-				{% for msg in message_list %}
-				<tr>
-					<td class="tcl">
-						<div class="intd">
-							<div class="icon"><div class="nosize"><!-- --></div></div>
-							<div class="tclcon">
-								<a href="{% url messages_detail msg.id %}">{{ msg.subject }}</a>
-							</div>
-						</div>
-					</td>
-					<td class="tc2" style="white-space: nowrap; OVERFLOW: hidden"><a href="{% url djangobb:forum_profile msg.recipient %}">{{ msg.recipient }}</a></td>
-					<td class="tcr" style="white-space: nowrap">{% forum_time msg.sent_at %}</td>
-				</tr>
-				{% endfor %}
-			{% else %}
-				<tr><td class="djangobbcon1" colspan="3">{% trans "No messages" %}</td></tr>
-			{% endif %}
-			</tbody>
-			</table>
-		</div>
-	</div>
-</div>
-{% endblock %}

File basic_project/templates/messages/view.html

-{% extends 'messages/base_pm.html' %}
-{% load forum_extras %}
-{% load i18n %}
-
-{% block sub_content %}
-
-<div id="p2" class="blockpost row_odd firstpost" style="margin-left: 14em;">
-		<h2><span>{% forum_time message.sent_at %}</span></h2>
-		<div class="box">
-			<div class="inbox">
-				<div class="postleft">
-					<dl>
-						<dt><strong>{{ message.sender|profile_link }}</strong></dt>
-						<dd>
-						{% if message.sender.forum_profile.status %}
-							<strong>{{ message.sender.forum_profile.status }}</strong>
-						{% else %}
-							<strong>{{ message.sender.forum_profile.group }}</strong>
-						{% endif %}
-						</dd>
-						{% if forum_settings.AUTHORITY_SUPPORT %}
-							<dd class="usertitle">
-							{{ message.sender|forum_authority }}
-							</dd>
-						{% endif %}
-						{% if message.sender.forum_profile.avatar and message.sender.forum_profile.show_avatar %}
-							<dd class="postavatar"><img src="{{ message.sender.forum_profile.avatar.url }}" /></dd>
-						{% else %}
-							<dd class="postavatar"><img src="{% gravatar message.sender.email %}" /></dd>
-						{% endif %}
-						<dd>{% trans "Registered:" %} {{ message.sender.date_joined|date:"Y-m-d" }}</dd>
-						<dd>{% trans "Posts:" %} {{ message.sender.posts.count }}</dd>
-						{% if moderator %}
-							<dd>{% trans "IP:" %} {{ post_user_ip }}</dd>
-						{% endif %}
-						<dd class="usercontacts"><a href="{% url djangobb:forum_profile message.sender %}">{% trans "Profile" %}</a>&nbsp;&nbsp;
-						{% if message.sender.forum_profile.privacy_permission == 0 %}
-							<a href="mailto:{{ message.sender.email }}">{% trans "E-mail" %}</a>&nbsp;&nbsp;
-						{% else %}
-							{% if message.sender.forum_profile.privacy_permission == 1 %}
-									<a href="{% url djangobb:misc %}?mail_to={{ message.sender }}">{% trans "Send e-mail" %}</a>&nbsp;&nbsp;
-							{% endif %}
-						{% endif %}
-						{% if user_is_authenticated %}
-							<a href="{% url messages_reply %}?recipient={{ post_user.username }}">{% trans "PM" %}</a>&nbsp;&nbsp;</dd>
-						{% endif %}
-					</dl>
-				</div>
-				<div class="postright">
-					<div class="postmsg">
-						{{ message.body|linebreaksbr }}
-						{% if not user.is_authenticated or user.forum_profile.show_signatures %}
-                    	{% if message.sender.forum_profile.signature %}
-                    	<div class="postsignature">
-                    		<br>
-                    		---
-							<br>
-                    		{{ message.sender.forum_profile.signature|safe }}
-                    	</div>
-                    {% endif %}
-                    {% endif %}
-					</div>
-					</div>
-				<div class="clearer"></div>
-				<div class="postfootleft">
-				{% if message.sender|online %}
-					<p><strong>{% trans "Online" %}</strong></p>
-				{% else %}
-					<p>{% trans "Offline" %}</p>
-				{% endif %}
-				</div>
-				<div class="postfootright">
-					<ul>
-						<li>
-							<a onclick="return confirm('{% trans "Are you sure you want to delete this post?" %}')" href="{% url messages_delete message.id %}">{% trans "Delete" %}</a>
-						</li>
-						<li>
-							| <a href="{% url messages_reply message.id %}">{% trans "Reply" %}</a>
-						</li>
-					</ul>
-				</div>
-			</div>
-		</div>
-	</div>
-{% endblock %}

File basic_project/urls.py

 # PM Extension
 if (forum_settings.PM_SUPPORT):
     urlpatterns += patterns('',
-        (r'^forum/pm/', include('messages.urls')),
+        (r'^forum/pm/', include('django_messages.urls')),
    )
 
 if (settings.DEBUG):

File requirements.txt

 Whoosh
 django-registration==0.8
-https://bitbucket.org/benoitc/django-authopenid/get/tip.tar.gz
+https://bitbucket.org/benoitc/django-authopenid/get/tip.tar.gz
+https://github.com/arneb/django-messages/tarball/master#egg=django-messages