Skip to content

Commit b23fd06

Browse files
committed
Update CI config
Update MANIFEST.in Add sorting guidance for 3rd-party app imports Improve documentation markup Remove pinax-theme-bootstrap from test requirements
1 parent d5e9301 commit b23fd06

File tree

6 files changed

+29
-28
lines changed

6 files changed

+29
-28
lines changed

MANIFEST.in

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
11
include AUTHORS
22
include LICENSE
33
include README.md
4-
recursive-include pinax/messages/static *
5-
recursive-include pinax/messages/templates *

README.md

Lines changed: 21 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -55,22 +55,22 @@ Django \ Python | 2.7 | 3.4 | 3.5 | 3.6
5555

5656
To install pinax-messages:
5757

58-
```
58+
```commandline
5959
$ pip install pinax-messages
6060
```
6161

6262
Add `"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

7171
Run 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

9494
Place 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

102102
Place 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

110110
Add 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

163163
For 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

179179
For 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

pinax/messages/tests/tests.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,6 @@ def test_ordered(self):
8282
"debug": True,
8383
"context_processors": [
8484
"django.contrib.auth.context_processors.auth",
85-
"pinax_theme_bootstrap.context_processors.theme",
8685
"pinax.messages.context_processors.user_messages",
8786
]
8887
}
@@ -243,7 +242,7 @@ def test_unread_thread_count_one_unread(self):
243242
Message.new_message(
244243
self.brosner,
245244
[self.jtauber],
246-
"Why did you break the internet?", "I demand to know.").thread
245+
"Why did you break the internet?", "I demand to know.")
247246

248247
tmpl = """
249248
{% load pinax_messages_tags %}
@@ -270,7 +269,7 @@ def test_unread_thread_count_two_messages_incl_reply(self):
270269
Message.new_message(
271270
self.brosner,
272271
[self.jtauber],
273-
"Second message", "So there are two.").thread
272+
"Second message", "So there are two.")
274273
tmpl = """
275274
{% load pinax_messages_tags %}
276275
{% if user|unread_thread_count %}{{ user|unread_thread_count }}{% endif %}
@@ -310,7 +309,7 @@ def test_unread_thread_count_within_with_assignment(self):
310309
Message.new_message(
311310
self.brosner,
312311
[self.jtauber],
313-
"Why did you break the internet?", "I demand to know.").thread
312+
"Why did you break the internet?", "I demand to know.")
314313

315314
tmpl = """
316315
{% load pinax_messages_tags %}

runtests.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,6 @@
1313
"django.contrib.contenttypes",
1414
"django.contrib.sites",
1515
"django.contrib.sessions",
16-
"pinax_theme_bootstrap",
17-
"bootstrapform",
1816
"pinax.messages",
1917
"pinax.messages.tests"
2018
],
@@ -39,7 +37,6 @@
3937
"debug": True,
4038
"context_processors": [
4139
"django.contrib.auth.context_processors.auth",
42-
"pinax_theme_bootstrap.context_processors.theme",
4340
"pinax.messages.context_processors.user_messages",
4441
]
4542
}

setup.py

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
from setuptools import find_packages, setup
22

3-
VERSION = "2.0.1"
3+
VERSION = "2.0.2"
44
LONG_DESCRIPTION = """
55
.. image:: http://pinaxproject.com/pinax-design/patches/pinax-messages.svg
66
:target: https://pypi.python.org/pypi/pinax-messages/
@@ -81,12 +81,11 @@
8181
"Topic :: Software Development :: Libraries :: Python Modules",
8282
],
8383
install_requires=[
84-
"django>=1.8",
85-
"django-appconf>=1.0.1",
84+
"django>=1.11",
85+
"django-appconf>=1.0.2",
8686
],
8787
tests_require=[
88-
"django-test-plus>=1.0.11",
89-
"pinax-theme-bootstrap>=7.10.1",
88+
"django-test-plus>=1.0.22",
9089
],
9190
test_suite="runtests.runtests",
9291
zip_safe=False

tox.ini

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ inline-quotes = double
88
[isort]
99
multi_line_output=3
1010
known_django=django
11-
known_third_party=mock,pinax
11+
known_third_party=appconf,pinax
1212
sections=FUTURE,STDLIB,DJANGO,THIRDPARTY,FIRSTPARTY,LOCALFOLDER
1313
skip_glob=**/*/migrations/*
1414

0 commit comments

Comments
 (0)