Allows to speed-up loading of django admin page by loading heavy calculated field in lazy maner - via separate ajax requests.
Project description
django-admin-lazy-load
Allows to speed-up loading of django admin page by deffering (lazy loading) heavy calculated field - via separate ajax requests.
Super-easy yet flexible set-up. Supports any kind of admin fields including:
- properties defined on model level
- properties defined in admin class
Please look into example admin.py for different cases.
Install
pip install django-admin-lazy-load
- Add
"admin_lazy_load"
toINSTALLED_APPS
- Make sure
django.contrib.staticfiles.finders.AppDirectoriesFinder
is not disabled in your settings.
Usage
from admin_lazy_load import LazyLoadAdminMixin
....
class YourModelAdmin(LazyLoadAdminMixin, ModelAdmin):
...
lazy_loaded_fields = (
'calculated_value'
)
list_display = (
...
'calculated_value_lazy_click'
...
)
def calculated_value(self, obj):
return ...
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
Built Distribution
Close
Hashes for django_admin_lazy_load_alexforks-0.2.2.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6351faeb6818ae41fc6997f4ab1d51569ee744898d8ca3030261a70e7b3e1d2b |
|
MD5 | c4cf2be4628afcdd802a02ee58c617f7 |
|
BLAKE2b-256 | 58e5ab3b4c2fd383f681981bab927630d009f4188b6ce2f1af4c23b3e0296729 |
Close
Hashes for django_admin_lazy_load_alexforks-0.2.2-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0166a645b138c07a842963b63c9dd8e120f7d7d2963e54d33facad97ed45fa0e |
|
MD5 | b6fdc4189763387921edf38e498fa520 |
|
BLAKE2b-256 | fd97fa3394f8acd8df2e2b7b30f82769d232feab9381dbb2ec02a2be16d7705c |