Skip to content

Commit e8714b3

Browse files
committed
Rename and update README.rst to README.md
1 parent 043a9b0 commit e8714b3

File tree

3 files changed

+25
-17
lines changed

3 files changed

+25
-17
lines changed

MANIFEST.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
include CHANGES.txt CONTRIBUTORS.txt LICENSE.txt README.rst
1+
include CHANGES.txt CONTRIBUTORS.txt LICENSE.txt README.md
22

33
graft webstack_django_sorting
44

README.rst renamed to README.md

Lines changed: 23 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@ webstack-django-sorting
44
What?
55
-----
66

7-
``webstack-django-sorting`` is a Django app which allows for easy sorting of
7+
`webstack-django-sorting` is a Django app which allows for easy sorting of
88
data tables. You don't need to change anything to your views to use it. It
99
provides sorting links for table headers. It is the perfect companion of
10-
`django-pagination <https://github.com/zyga/django-pagination>`_.
10+
[django-pagination](https://github.com/zyga/django-pagination).
1111

1212
A demonstration of the features is provided in `testproj` directory.
1313

@@ -18,29 +18,32 @@ Features
1818
- Switches between ascending, descending, and no sorting
1919
- Provides links to sort on different criterions
2020
- Visual feedback on applied ordering
21-
- Supports Python 2.7, 3.5 and 3.6
21+
- Supports Python 2.7, 3.5+
2222
- Supports translation of link titles
2323

24-
Upgrade from v0.5.0 and below
25-
-----------------------------
24+
Upgrade from v0.5.0
25+
-------------------
2626

27-
To upgrade to ``webstack-django-sorting`` v1.0.0+, you must remove the old middleware
28-
``webstack_django_sorting.middleware.SortingMiddleware`` from ``MIDDLEWARE_CLASSES`` list.
27+
To upgrade to `webstack-django-sorting` v1.0.0+, you must remove the old middleware
28+
`webstack_django_sorting.middleware.SortingMiddleware` from `MIDDLEWARE_CLASSES` list.
2929

3030
How to use it in your project
3131
---------------------------------
3232

33-
1. ``pip install webstack_django_sorting``
33+
1. `pip install webstack_django_sorting`
3434

35-
2. Add the application to the ``INSTALLED_APPS`` list::
35+
2. Add the application to the `INSTALLED_APPS` list:
3636

37+
```python
3738
INSTALLED_APPS = [
3839
# ...
3940
'webstack_django_sorting',
4041
]
42+
```
4143

42-
3. Check the request context processor is loaded in ``TEMPLATES`` options::
44+
3. Check the request context processor is loaded in `TEMPLATES` options:
4345

46+
```python
4447
TEMPLATES = [
4548
{
4649
'BACKEND': 'django.template.backends.django.DjangoTemplates',
@@ -55,34 +58,39 @@ How to use it in your project
5558
},
5659
},
5760
]
61+
```
5862

59-
4. Add this line at the top of your template to load the sorting tags::
63+
4. Add this line at the top of your template to load the sorting tags:
6064

6165
{% load sorting_tags %}
6266

6367
5. Decide on a variable that you would like to sort, and use the
64-
autosort tag on that variable before iterating over it::
68+
autosort tag on that variable before iterating over it:
6569

6670
{% autosort object_list %}
6771

6872
6. Now, you want to display different headers with links to sort
69-
your objects_list::
73+
your objects_list:
7074

75+
```html
7176
<tr>
7277
<th>{% anchor first_name _("Name") %}</th>
7378
<th>{% anchor creation_date _("Creation") %}</th>
7479
</tr>
80+
```
7581

7682
The first argument is a field or an attribute of the objects list, and the
7783
second one (optional) is a title that would be displayed. The previous
78-
snippet will be rendered like this in French::
84+
snippet will be rendered like this in French:
7985

86+
```html
8087
<tr>
8188
<th><a href="/path/to/your/view/?sort=first_name" title="Nom">Nom</a></th>
8289
<th><a href="/path/to/your/view/?sort=creation_date" title="Création">Création</a></th>
8390
</tr>
91+
```
8492

8593
If your application doesn't support internationalization, you can use a
86-
simple ``{% anchor first_name Name %}``.
94+
simple `{% anchor first_name Name %}`.
8795

8896
That's it!

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
name="webstack-django-sorting",
1515
version=__version__,
1616
description="Easy sorting of tables with Django",
17-
long_description=codecs.open("README.rst", "r", "utf-8").read(),
17+
long_description=codecs.open("README.md", "r", "utf-8").read(),
1818
author="Stéphane Raimbault",
1919
author_email="[email protected]",
2020
url="http://github.com/webstack/webstack-django-sorting/",

0 commit comments

Comments
 (0)