I will make this short and sweet. Django 1.5. Matplotlib 1.3. I wanted to generate some plots and send then to the client as an HTTP response. Much like the method in the Django docs for sending out a CSV.
Googling around showed two general approaches:
Neither worked. The Django url was:
urlpatterns = patterns( '', url(r'^graph.png/$', views.graph), )
But when I switched it to:
urlpatterns = patterns( '', url(r'^graph.png$', views.graph), )
Both methods worked. Ouch. I will never get those 2 hours of my life back.