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.

Source Distribution

sw-django-utils-0.0.38.tar.gz (11.5 kB view hashes)

Uploaded Source

Built Distribution

sw_django_utils-0.0.38-py2.7.egg (34.2 kB view hashes)

Uploaded Source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page