=============================
Django Reorder
=============================
.. image:: https://badge.fury.io/py/django-reorder.png
:target: https://badge.fury.io/py/django-reorder
A project that helps sorting querysets in a specific order
Documentation
-------------
The full documentation is at https://django-reorder.readthedocs.org.
Quickstart
----------
Install Django Reorder::
pip install django-reorder
Then use it in a project::
from django_reorder.reorder import reorder
Tshirt.objects.order_by(reorder(size=['S', 'M', 'L']))
Some more detailed examples can be foind on the :doc:`usage` page.
Features
--------
* Can be used in ``order_by()`` and in ``annotate()`` calls.
* Works across relationships.
* Lets you control the sorting order of ``NULL`` values explicitly (otherwise
it can vary across databases).
Running Tests
--------------
Does the code actually work?
::
source <YOURVIRTUALENV>/bin/activate
(myenv) $ pip install -r requirements_test.txt
(myenv) $ python runtests.py
Credits
---------
Tools used in rendering this package:
* Cookiecutter_
* `cookiecutter-djangopackage`_
.. _Cookiecutter: https://github.com/audreyr/cookiecutter
.. _`cookiecutter-djangopackage`: https://github.com/pydanny/cookiecutter-djangopackage
History
-------
0.2.1 (2016-09-13)
++++++++++++++++++
* Forgot to ``pull`` before I ``push``ed...
0.2.0 (2016-09-13)
++++++++++++++++++
* Added ``null_first()`` and ``null_last()`` shortcuts.
0.1.0 (2016-07-26)
++++++++++++++++++
* First release on PyPI.
Django Reorder
=============================
.. image:: https://badge.fury.io/py/django-reorder.png
:target: https://badge.fury.io/py/django-reorder
A project that helps sorting querysets in a specific order
Documentation
-------------
The full documentation is at https://django-reorder.readthedocs.org.
Quickstart
----------
Install Django Reorder::
pip install django-reorder
Then use it in a project::
from django_reorder.reorder import reorder
Tshirt.objects.order_by(reorder(size=['S', 'M', 'L']))
Some more detailed examples can be foind on the :doc:`usage` page.
Features
--------
* Can be used in ``order_by()`` and in ``annotate()`` calls.
* Works across relationships.
* Lets you control the sorting order of ``NULL`` values explicitly (otherwise
it can vary across databases).
Running Tests
--------------
Does the code actually work?
::
source <YOURVIRTUALENV>/bin/activate
(myenv) $ pip install -r requirements_test.txt
(myenv) $ python runtests.py
Credits
---------
Tools used in rendering this package:
* Cookiecutter_
* `cookiecutter-djangopackage`_
.. _Cookiecutter: https://github.com/audreyr/cookiecutter
.. _`cookiecutter-djangopackage`: https://github.com/pydanny/cookiecutter-djangopackage
History
-------
0.2.1 (2016-09-13)
++++++++++++++++++
* Forgot to ``pull`` before I ``push``ed...
0.2.0 (2016-09-13)
++++++++++++++++++
* Added ``null_first()`` and ``null_last()`` shortcuts.
0.1.0 (2016-07-26)
++++++++++++++++++
* First release on PyPI.
Release files for django-reorder 0.2.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| django-reorder-0.2.1.tar.gz | 5.3 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| django_reorder-0.2.1-py2.py3-none-any.whl | Python 3, Python 2 | none | any | Details |
Total release size: 9.9 kB
Release files / django-reorder-0.2.1.tar.gz
| Download URL | django-reorder-0.2.1.tar.gz |
|---|---|
| Size | 5.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
9ccfc596e5268e7e5dd4a1cb8ec6c37da77074eb85b4ef9f0ddde0cef140f86a
|
|
BLAKE2b-256 checksum How to use checksums |
564b8a4842cdf662d698a39af346d034bb1f237d759ed691ada5e3531135af0d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Release files / django_reorder-0.2.1-py2.py3-none-any.whl
| Download URL | django_reorder-0.2.1-py2.py3-none-any.whl |
|---|---|
| Size | 4.6 kB |
| Tags | Python 2 Python 3 |
|
SHA-256 checksum How to use checksums |
da43674ddee275fae19741b7b12ed772cd3329ebb5262aa2b47327ead2e0354d
|
|
BLAKE2b-256 checksum How to use checksums |
26e592390baec11b5a747bdbb7fec0769937921d0a6195f6929b23375f8e9ef3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |