Easy lists for django views
Project description
# django-smart-lists
```python
from smart_lists.mixins import SmartListMixin
class AccountListView(LoginRequiredMixin, SmartListMixin, ListView):
model = Account
paginate_by = 100
ordering_allowed_fields = ['company_name', 'code', 'created_date']
list_display = ['company_name', 'code', 'created_date', 'balance']
```
This will give you a click-to-sort table with pagination. All you have to do is to make a template like this:
```html
{% extends "base.html" %}
{% load smart_list %}
{% block content %}
{% smart_list %}
{% endblock %}
```
**The built-in templates are bootstrap 3 compatible - but override them easily (by positioning the apps in INSTALLED_APPS) to fit your own needs**
### License
MIT License
Copyright (c) 2017 Plecto
```python
from smart_lists.mixins import SmartListMixin
class AccountListView(LoginRequiredMixin, SmartListMixin, ListView):
model = Account
paginate_by = 100
ordering_allowed_fields = ['company_name', 'code', 'created_date']
list_display = ['company_name', 'code', 'created_date', 'balance']
```
This will give you a click-to-sort table with pagination. All you have to do is to make a template like this:
```html
{% extends "base.html" %}
{% load smart_list %}
{% block content %}
{% smart_list %}
{% endblock %}
```
**The built-in templates are bootstrap 3 compatible - but override them easily (by positioning the apps in INSTALLED_APPS) to fit your own needs**
### License
MIT License
Copyright (c) 2017 Plecto
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
File details
Details for the file django-smart-lists-1.0.16.tar.gz
.
File metadata
- Download URL: django-smart-lists-1.0.16.tar.gz
- Upload date:
- Size: 9.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6a69ad7547f60dc632ffd6d6c3bd012625d1cd73002c29b7b6edae2bb04eecbf |
|
MD5 | 726c451cbe9bdb397cd90918c931acc7 |
|
BLAKE2b-256 | c17e19e17337fd173f112511c3ffddfd387300f5b073d2324198565c6c23a032 |