wiki:running

3. Running the application

3.1 Run server

You are now ready to run the server. Execute the following command:

$ ./manage.py runserver

If everything went as it should, you should get output like:

0 errors found
Django version 1.3, using settings 'persisted.settings'
Development server is running at http://127.0.0.1:8000/
Quit the server with CONTROL-C.

You can now visit the heatmap at http://127.0.0.1:8000/website/

3.2 Realtime rendering

Realtime rendering makes use of the tile.py file, which is for now located in the website folder. If you have data in the tables described in the previous chapter, you might get lines like these in your terminal:

[09/Jun/2011 09:14:45] "GET /website/tile/14/8399,5399.png?colour=255,0,0 HTTP/1.1" 200 321

This means heatmap images are being requested and served. Note that rendertime will increase with larger datasets.

3.3 Prerendering

You can also choose to prerender a set of heatmap images which will be saved. The prerender process will make use of the original django_gheat way of rendering.

You can prerender a heatmap with the following command:

$ ./manage.py gen_tiles

This will prerender a heatmap with the default boundingbox specified in gheat/management/commands/gen_tiles.py To use a different boundingbox or colorscheme, you can customize the command:

# -s = start of the boundingbox, SW corner
# -e = end of the boundingbox, NE corner
# -c = colorscheme located in django_gheat/gheat/etc/color-schemes/
# -b = view used for creating tiles, default should be fine

$ ./manage.py gen_tiles -s 60,6 -e 66,8 -c firetrans -b serve_tile

Make sure you get your boundingbox right. If you have a box too small, there is a risk some images will be rendered realtime when requested. If you have a box too large, the process will take longer than necessary.


You are now running the program! Check the wiki index for other useful pages.

Last modified 13 years ago Last modified on Jun 28, 2011, 7:25:22 PM
Note: See TracWiki for help on using the wiki.