| 1 | = 3. Running the application = |
| 2 | == 3.1 Run server == |
| 3 | You are now ready to run the server. Execute the following command: |
| 4 | {{{ |
| 5 | $ ./manage.py runserver |
| 6 | }}} |
| 7 | |
| 8 | If everything went as it should, you should get output like: |
| 9 | {{{ |
| 10 | 0 errors found |
| 11 | Django version 1.3, using settings 'persisted.settings' |
| 12 | Development server is running at http://127.0.0.1:8000/ |
| 13 | Quit the server with CONTROL-C. |
| 14 | }}} |
| 15 | |
| 16 | You can now visit the heatmap at http://127.0.0.1:8000/website/ |
| 17 | |
| 18 | == 3.2 Realtime rendering == |
| 19 | If you have data in the tables described in the previous chapter, you might get lines like these in your terminal: |
| 20 | {{{ |
| 21 | [02/May/2011 09:50:16] "GET /gheat/classic/16/33584,21598.png HTTP/1.1" 200 334 |
| 22 | }}} |
| 23 | 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. |
| 24 | |
| 25 | == 3.3 Prerendering == |
| 26 | If realtime rendering takes too much time, you can choose to prerender the images. |
| 27 | |
| 28 | You can prerender a heatmap with the following command: |
| 29 | {{{ |
| 30 | $ ./manage.py gen_tiles |
| 31 | }}} |
| 32 | This will prerender a heatmap with the default boundingbox specified in gheat/management/commands/gen_tiles.py |
| 33 | To use a different boundingbox or colorscheme, you can customize the command: |
| 34 | {{{ |
| 35 | # -s = start of the boundingbox, SW corner |
| 36 | # -e = end of the boundingbox, NE corner |
| 37 | # -c = colorscheme located in django_gheat/gheat/etc/color-schemes/ |
| 38 | # -b = view used for creating tiles, default should be fine |
| 39 | |
| 40 | $ ./manage.py gen_tiles -s 60,6 -e 66,8 -c firetrans -b serve_tile |
| 41 | }}} |
| 42 | 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. |