Security News
Fluent Assertions Faces Backlash After Abandoning Open Source Licensing
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
.. image:: https://badge.fury.io/py/acdh-django-charts.svg :target: https://badge.fury.io/py/acdh-django-charts
.. image:: https://travis-ci.org/acdh-oeaw/acdh-django-charts.svg?branch=master :target: https://travis-ci.org/acdh-oeaw/acdh-django-charts
.. image:: https://codecov.io/gh/acdh-oeaw/acdh-django-charts/branch/master/graph/badge.svg :target: https://codecov.io/gh/acdh-oeaw/acdh-django-charts
An app to explore your data through charts based on Highcharts.js
The full documentation is at https://acdh-django-charts.readthedocs.io.
Install django_charts::
pip install acdh-django-charts
Add it to your INSTALLED_APPS
:
.. code-block:: python
INSTALLED_APPS = (
...
'charts',
...
)
Add django_charts's URL patterns:
.. code-block:: python
urlpatterns = [
...
url(r'^charts/', include('charts.urls', namespace='charts')),
...
]
By default the app's templates extend a base template webpage/base.html
. To ovveride this, just define a CHARTS_BASE_TEMPLATE
variable on your project's settings.py
like e.g:
.. code-block:: python
CHARTS_BASE_TEMPLATE = 'base.html'
To link to the application's 'chart-selector-view' you can add something like the snippet below to your e.g. base-template:
.. code-block:: html
<a href="{% url 'charts:chart_selector' %}">Charts</a>
To visualize any property of your model you have to pass in the models name (lowercase), the field-path (using django's lookup syntax __
to follow foreign key and many2many relations) and the chart type (bar|line|pie) via keyword arguments to the charts.views.DynChartView()
. In case those params are valid (i.d. the model and the lookup path acutally exist) the according chart should be drawn. But be aware that this only works if your project's DEBUG
settings are set to True
.
As recomended alternative you should create ChartConfig
objects for each property/model you'd like to explore via django admin-backend.
The package ships with a management command to
.. code-block:: console
python manage.py create_charttypes
.. code-block:: console
python manage.py delete_charttypes
.. code-block:: console
python manage.py create_charts <app_name>
.. code-block:: console
python manage.py delete_charts <app_name>
.. code-block:: console
python setup.py sdist bdist_wheel
twine upload dist/*
Does the code actually work?
::
source <YOURVIRTUALENV>/bin/activate
(myenv) $ pip install tox
(myenv) $ tox
Tools used in rendering this package:
cookiecutter-djangopackage
_.. _Cookiecutter: https://github.com/audreyr/cookiecutter
.. _cookiecutter-djangopackage
: https://github.com/pydanny/cookiecutter-djangopackage
0.5.4 (2019-10-11) ++++++++++++++++++
0.5.3 (2019-02-12) ++++++++++++++++++
0.5.2 (2018-12-18) ++++++++++++++++++
0.5.1 (2018-12-05) ++++++++++++++++++
0.5.0 (2018-10-25) ++++++++++++++++++
app_name
param to ChartConfig to avoid ambiguity in case models in different apps do have the same name.0.4.1 (2018-07-12) ++++++++++++++++++
0.4.0 (2018-07-10) ++++++++++++++++++
0.3.0 (2018-06-13) ++++++++++++++++++
0.3.0 (2018-06-05) ++++++++++++++++++
0.2.0 (2018-06-01) ++++++++++++++++++
0.1.0 (2018-06-01) ++++++++++++++++++
FAQs
An app to explore your data through charts based on Highcharts.js
We found that acdh-django-charts demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
Research
Security News
Socket researchers uncover the risks of a malicious Python package targeting Discord developers.
Security News
The UK is proposing a bold ban on ransomware payments by public entities to disrupt cybercrime, protect critical services, and lead global cybersecurity efforts.