Internals

The documentation below details some of the internal workings of django-pygwalker and its components. This documentation is automatically generated from the source code. See the source code in github for full details.

https://github.com/djangoaddicts/django-pygwalker


Views

class djangoaddicts.pygwalker.views.DynamicCsvPygWalkerView(**kwargs)[source]

View to create a PyGWalker visualization interface from a provided csv file. See https://github.com/Kanaries/pygwalker for more information on PyGWalker.

class parameters:

template_name - template used when rendering page; defaults to: pygwalker/bs5/pygwalker_dynamic.html theme - PyGWalker theme to use for pyg html; defaults to “media” title - title used on html render

class djangoaddicts.pygwalker.views.GenericPygWalkerView(**kwargs)[source]

View to create a PyGWalker visualization interface from an app and model passed as kwargs. If query parameters are present, include only filtered data, based on query parameters, in the PyGWalker interface.

get(request, **kwargs)[source]

process GET request

class djangoaddicts.pygwalker.views.PygWalkerListView(**kwargs)[source]

extend the HandyHelperListView (from handyhelpers) to add an icon for a PyGWalker visualzation interface. If the list view is filtered, include only filtered data in the PyGWalker interface.

class djangoaddicts.pygwalker.views.PygWalkerPaginatedListView(**kwargs)[source]

extend the HandyHelperPaginatedListView (from handyhelpers) to add an icon for a PyGWalker visualzation interface. If the list view is filtered, include only filtered data in the PyGWalker interface.

class djangoaddicts.pygwalker.views.PygWalkerView(**kwargs)[source]

View to create a PyGWalker visualization interface from a Django queryset. See https://github.com/Kanaries/pygwalker for more information on PyGWalker.

class parameters:

field_list - list of model fields to include; defaults to fields defined in the model queryset - queryset providing data available to visualization template_name - template used when rendering page; defaults to: pygwalker/bs5/pyg.html theme - PyGWalker theme to use for pyg html; defaults to: “media” title - title used on html render

example:

from djangoaddicts.pygwalker.views import PygWalkerView class MyPygView(PygWalkerView):

queryset = Order.objects.all() title = “Order Data Analysis” theme = “light” field_list = [“status__name”, “customer”, “order_id”, “created_at”, “updated_at”, “products”]

class djangoaddicts.pygwalker.views.StaticCsvPygWalkerView(**kwargs)[source]

View to create a PyGWalker visualization interface from a statically definied csv file. See https://github.com/Kanaries/pygwalker for more information on PyGWalker.

class parameters:

csv_file - csv file containing data to visualize template_name - template used when rendering page; defaults to: pygwalker/bs5/pyg.html theme - PyGWalker theme to use for pyg html; defaults to: “media” title - title used on html render

example:

from djangoaddicts.pygwalker.views import StaticCsvPygWalkerView class MyPygView(StaticCsvPygWalkerView):

csv_file = “my_csv_file.csv title = “Order Data Analysis” theme = “light”