Skip to main content

Soft Way company django utils.

Project description

# sw-django-utils
Soft Way company django utils
## Installation
1. Either checkout ``sw-django-utils`` from GitHub, or install using pip:
```bash
pip install sw-django-utils
```
2. Add ``sw-django-utils`` to your ``INSTALLED_APPS``:
```python
INSTALLED_APPS += (
'djutils',
)
```
## Using Sorting
In view:
```python
class Search(SortMixin, ListView):
model = models.ExampleModel
template_name = 'ExampleSearch.html'
sort_params = ['example_field', 'date_start', 'date_end']
```
In template:
```html
{% load djutils %}
<table>
<tr>
<th>#</th>
{% sort_th 'example_field' 'Example' %}
{% sort_th 'date_start' 'Created' %}
{% sort_th 'date_end' 'Expiring date' %}
</tr>
...
</table>
```

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for sw-django-utils, version 0.0.38
Filename, size File type Python version Upload date Hashes
Filename, size sw_django_utils-0.0.38-py2.7.egg (34.2 kB) File type Egg Python version 2.7 Upload date Hashes View hashes
Filename, size sw-django-utils-0.0.38.tar.gz (11.5 kB) File type Source Python version None Upload date Hashes View hashes

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page