@@ -55,22 +55,22 @@ Django \ Python | 2.7 | 3.4 | 3.5 | 3.6
5555
5656To install pinax-messages:
5757
58- ```
58+ ``` commandline
5959$ pip install pinax-messages
6060```
6161
6262Add ` "pinax.messages" ` to your ` INSTALLED_APPS ` setting:
6363
6464``` python
65- INSTALLED_APPS = (
66- # other apps
67- " pinax.messages" ,
68- )
65+ INSTALLED_APPS = [
66+ # other apps
67+ " pinax.messages" ,
68+ ]
6969```
7070
7171Run Django migrations to create ` pinax-messages ` database tables:
7272
73- ```
73+ ``` commandline
7474$ python manage.py migrate
7575```
7676
@@ -93,23 +93,23 @@ These snippets fall into three categories: view message inbox (all threads), vie
9393
9494Place this snippet wherever a "Message Inbox" link is needed for viewing user message inbox:
9595
96- ``` html
96+ ``` djangotemplate
9797<a href="{% url 'pinax_messages:inbox' %}"><i class="fa fa-envelope"></i> {% trans "Message Inbox" %}</a>
9898```
9999
100100#### View Message Thread
101101
102102Place this snippet wherever you have need to view a specific message thread:
103103
104- ``` html
104+ ``` djangotemplate
105105<a href="{% url 'pinax_messages:thread_detail' thread.pk %}"><i class="fa fa-envelope"></i> {% trans "View Message Thread" %}</a>
106106```
107107
108108#### Create Message - Template
109109
110110Add the following line to an object template in order to provide a button for messaging a user associated with ` object ` :
111111
112- ``` html
112+ ``` djangotemplate
113113<a href="{% url "pinax_messages:message_user_create" user_id=object.user.id %}" class="btn btn-default">Message this user</a>
114114```
115115
@@ -132,9 +132,9 @@ TEMPLATES = [
132132 {
133133 # ...
134134 " OPTIONS" : {
135- # ...
135+ # other options
136136 " context_processors" : [
137- # ...
137+ # other processors
138138 " pinax.messages.context_processors.user_messages"
139139 ],
140140 },
@@ -162,7 +162,7 @@ Determines if a message thread has unread messages for a user.
162162
163163For instance if there are unread messages in a thread, change the CSS class accordingly:
164164
165- ``` html
165+ ``` djangotemplate
166166{% load pinax_messages_tags %}
167167
168168 <div class="thread {% if thread|unread:user %}unread{% endif %}">
@@ -178,7 +178,7 @@ Returns the number of unread threads for the user. Use for notifying a user of n
178178
179179For instance if there are unread messages in a thread, change the CSS class accordingly:
180180
181- ``` html
181+ ``` djangotemplate
182182{% load pinax_messages_tags %}
183183
184184 {% with user|unread_thread_count as user_unread %}
@@ -251,6 +251,14 @@ These URL names are available when using pinax-messages urls.py:
251251
252252## Change Log
253253
254+ ### 2.0.2
255+
256+ * Update CI config
257+ * Update MANIFEST.in
258+ * Add sorting guidance for 3rd-party app imports
259+ * Improve documentation markup
260+ * Remove pinax-theme-bootstrap from test requirements
261+
254262### 2.0.1
255263
256264* Update test config
0 commit comments