News: Site redesigned. All content is statically served.

Attractive Charts with Open Flash Charts and Django

On request from a user, I've put together a sample django app that uses PyOFC2 to render charts in web browsers using Open Flash Charts 2.

The django+pyofc2 demo code can be downloaded from github.

Using PyOFC2 with Django

  1. Download Open Flash Chart 2
  2. Download and install PyOFC2
  3. Download SWFObject and put the files in your static media directory
  4. Add references to the SWFObject files and open-flash-chart.swf file in the header section. See templates/index.html for details
  5. Create a view to serve the json data from. See demoapp/views.py
  6. Configure urls.py to map the view to the url endpoint.

What are the facts? Again and again and again---what are the facts? Shun wishful thinking, ignore divine revelation, forget what "the stars fortell," avoid opinion, care not what the neighbors think, never mind the unguessable "verdict of history"---what are the facts, and to how many decimal places? You pilot always into an unknown future; facts are your single clue. Get the facts! -- R.A. Heinlein

Featured

PyOFC2 - Open Flash charts

is a Python library to generate data files for Open Flash Chart 2. This is a standalone library and can be used with a python web framework of your choice.

See DjPyOFC2_demo for use of PyOFC2 with Django

Teh blogging engine

is a simple blog application for Google App Engine.

Previously

03 Apr 2009 Adding OpenID to your website
22 Mar 2009 Year 2009 prospects

About

If you really have to

Tags