Skip to main content
Join the official 2019 Python Developers SurveyStart the survey!

Matplotlib field for Django

Project description

https://travis-ci.com/scidam/django_matplotlib.svg?branch=master

Django_matplotlib is a reusable Django app for embedding matplotlib figures into Django driven websites. It can be easily integrated with Django admin app and used in templates via forms.

Documentation: http://django-matplotlib.readthedocs.org/

Requirements

Django 1.11+, <3.0; Python 3.5+, <3.8.

Quick start

  1. Clone git repository to place where Django can find it:
pip install django-matplotlib
  1. Add “django_matplotlib” to your INSTALLED_APPS setting like this:
INSTALLED_APPS = [
    ...
    'django_matplotlib',
    ...
]
  1. Use MatplotlibField in your models.py, e.g.:
from django.db import models
from django_matplotlib.fields import MatplotlibFigureField

class MyModelWithFigure(models.Model):
    # ... other fields
    # figures.py should be in the same directory where models.py is placed.
    # see  ./django_matplotlib/figures.py for example.
    fig = MatplotlibFigureField(figure='test_figure', verbose_name='figure',
                                silent=True)
    # ... other fields
  1. Generate and apply migrations.

Note

It is assumed that you have Django installed already. Additionally, you will need to install matplotlib to use MatplotlibFigureField in your models.

Author

Dmitry E. Kislov

E-mail: kislov@easydan.com

Project details


Release history Release notifications

This version

0.1

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for django-matplotlib, version 0.1
Filename, size File type Python version Upload date Hashes
Filename, size django_matplotlib-0.1-py3-none-any.whl (12.5 kB) File type Wheel Python version py3 Upload date Hashes View hashes
Filename, size django-matplotlib-0.1.tar.gz (10.7 kB) File type Source Python version None Upload date Hashes View hashes

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page