Version 1 (modified by 14 years ago) ( diff ) | ,
---|
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
If you have data in the tables described in the previous chapter, you might get lines like these in your terminal:
[02/May/2011 09:50:16] "GET /gheat/classic/16/33584,21598.png HTTP/1.1" 200 334
This means heatmap images are being requested and served. If a tile hasn't been rendered before, it will be now. Note that rendertime will increase with larger datasets.
3.3 Prerendering
If realtime rendering takes too much time, you can choose to prerender the images.
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.