I\'m reading the book Matplotlib for Python Developers but am struggling to follow the example in the section \"Matplotlib in a Django application\" in chapter 8.
So
According to cannot import name patterns this is indeed a legacy interface of Django. I 'updated' it by making mpldjango/urls.py
as follows:
from django.conf.urls import include, url
from django.contrib import admin
import mpl.views
urlpatterns = [
url(r'^admin/', admin.site.urls),
url(r'mplimage.png', mpl.views.mplimage),
]
Now if I browse to http://localhost:8000/mplimage.png I see the plot as desired: