Mustache Box is a set of utilities to help you presenting graph of various data in a Django Project. Data can come from whatever source you want :
- Distant API
- Couchdb databases
- Your Django models
To make a graph you will need 3 parts :
- a method : the method lie in a Backend you create (or you can use predefine ones). Each method is responsible for gathering data (the way you want) and parse it to give a formated version of the data to the template.
- A template: the template is a classic HTML file made to hold your graph. You can use some predefine template or use your custom one
Of course there is serval features you gain with this architecture :
- url auto-discovering : You do not have to design an url for each method. Mustache Box take the pain away for you and design urls for you. Of course, if you don’t like this feature, you can design your own urls for each graphs.
- request/ajax response : each url responds either to classic request ( rendering a template with the data ) and to ajax returning only the formated json suitable for javasccript call. It has never be so easy to create long-pooling call.
- templatetags: when you create a graph you can use it in a templatetag too. It’s really easy to do. You just have to write another template to hold your graph in the templatetag.
This software is released under GPLv3