No project description provided
Project description
django-pygwalker
Turn your Django querysets into a user interfaces for visual analysis with PyGWalker.
This utility creates user interfaces based on your Django querysets for visual analysis using PyGwalker. For more information on PyGWalker see the github repo available here: https://github.com/Kanaries/pygwalker
Code Quality
Code Coverage
Dashboard: https://coveralls.io/github/djangoaddicts/django-pygwalker
Documentation
Full documentation can be found on http://django-pygwalker.readthedocs.org.
Documentation source files are available in the docs folder.
License
django-pygwalker is licensed under the GNU-3 license (see the LICENSE file for details).
https://github.com/djangoaddicts/django-pygwalker/blob/main/LICENSE
Installation
-
install via pip:
pip install django-pygwalker
-
add the following to your INSTALLED_APPS in settings.py:
djangoaddicts.pygwalker
NOTE: adding djangoaddicts.pygwalker to INSTALLED_APPS is only required if you intend to use the built-in templates.
Features
PygWalkerView
The PygWalkerView view renders a page containing PyGWalker html. This view takes a queryset parameter and included all data in the queryset for visualizations. By default fields defined in the model will be included. To exclude fields or include additional fields (such as related fields), use the field_list parameter to specify exact fields desired for visualizations.
A Bootstrap 5 template is included, but can be overwritten using the template_name parameter.
Parameters
- field_list: list of model fields to include (defaults to fields defined in the model)
- queryset: queryset providing data available to visualization
- theme: PyGWalker theme to use for pyg html (defaults to "media")
- title: title used on html render
- template_name: template used when rendering page; (defaults to pygwalker/bs5/pygwalker.html)
Usage Examples
from djangoaddicts.pygwalker.views import PygWalkerView
class MyPygWalkerView(PygWalkerView):
queryset = MyModel.objects.all()
Explicitly Defined Fields
from djangoaddicts.pygwalker.views import PygWalkerView
class MyPygWalkerView(PygWalkerView):
queryset = MyModel.objects.all()
title = "MyModel Data Analysis"
theme = "light"
field_list = ["name", "some_field", "some_other__related_field", "id", "created_at", "updated_at"]
Custom Template
Custom views/templates can be used to override the Bootstrap 5 templates provided by default view. Here is an example:
from djangoaddicts.pygwalker.views import PygWalkerView
class MyPygWalkerView(PygWalkerView):
queryset = MyModel.objects.all()
template_name = "my_custom_template.html"
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
Hashes for django-pygwalker-0.0.0.dev1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | f1da1ee723319550b443e8ead8935d57c2c1c7294bbec89c10457e43ce2fcd2d |
|
MD5 | 25de1174c141a8918778bd26df1f5467 |
|
BLAKE2b-256 | a7643f82c12397b8f76136010c32c30f6c6b6241897eccd5a0878a6791048701 |
Hashes for django_pygwalker-0.0.0.dev1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 09c7cb5b743f8c1cfee3449b20ab76aa24864c70fe5b8df35c152a07b0d0e5f4 |
|
MD5 | ab4dc21e0f0dc6d2fbf76e090613d650 |
|
BLAKE2b-256 | 70f13563e2e5d07a305b65ea07eed54cbc306a8034589b33dfb7b85e254ed6d9 |