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>
```
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
Release history Release notifications | RSS feed
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)
Built Distribution
sw_django_utils-0.0.38-py2.7.egg
(34.2 kB
view hashes)
Close
Hashes for sw_django_utils-0.0.38-py2.7.egg
Algorithm | Hash digest | |
---|---|---|
SHA256 | 486815bd08c1f75a69b9d7ca73b1400e209127fe4f939fd12824fc42d3104138 |
|
MD5 | 1fcdb61b1552211b1f4bc9bc3f6147c1 |
|
BLAKE2b-256 | 14b027c714709ab2a66c8dd8a0fc4d6f6911b3c266959055443c71c431244c8e |