How to embed matplotlib graph in Django webpage?

前端 未结 4 1870
情歌与酒
情歌与酒 2021-02-04 12:00

So, bear with me as I\'m VERY new to Django, Python, and web-development in general. What I want to do is display a graph that I\'ve made using matplotlib. I had it working to w

4条回答
  •  梦如初夏
    2021-02-04 12:57

    If you want to embed matplotlib figures to django-admin you can try django-matplotlib field. This field doesn't create a column in the database, but is rendered as a regular field. You don't need to customize/subclass admin.ModelAdmin, just use this field in your models and define how the figure will be generated.

提交回复
热议问题