A project that helps sorting querysets in a specific order
Project description
=============================
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.
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.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.
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.1.0 (2016-07-26)
++++++++++++++++++
* First release on PyPI.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
django-reorder-0.1.1.tar.gz
(5.1 kB
view details)
Built Distribution
File details
Details for the file django-reorder-0.1.1.tar.gz
.
File metadata
- Download URL: django-reorder-0.1.1.tar.gz
- Upload date:
- Size: 5.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 63bc4d9bbaf54b6b9aeb7ae06e303e228bc432fbaf18fd812f3cc2ca87aeb317 |
|
MD5 | 56c651af1e51f9e29acd00ad41917099 |
|
BLAKE2b-256 | 4dc5be5eb4926f79e8ef568dc6854f5b9abf4e674a2e2c0919995e7139669460 |
File details
Details for the file django_reorder-0.1.1-py2.py3-none-any.whl
.
File metadata
- Download URL: django_reorder-0.1.1-py2.py3-none-any.whl
- Upload date:
- Size: 4.2 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 180925e135efa66fe7a9436d02cb7da6eac6d2957e2d59226a209abf4e96f7db |
|
MD5 | 712b0c6995fbc8470b83349b71c36df1 |
|
BLAKE2b-256 | eb9be12d181a033157d0ab96584909bbdfebd6cf291ab2889db5eb9dd2ae488b |