rubenespadas/DionaeaFR — pull request #13 by ikoniaris (2014-08-02 21:52:34+00:00)
Title: Make number of days parameterized and tidy up code

Hi @rubenespadas. Thanks for your project first of all, I highly appreciate your work. This is Ion from BruteForce Lab by the way (http://bruteforce.gr), I have written about DionaeaFR in the past and it is one of the main visualization tools included in the HoneyDrive (http://bruteforce.gr/honeydrive) honeypot bundle distro.

So, I have made some changes to DionaeaFR. First of all, sorry for seeing so many changed files, I haven't actually "changed" that many lines, but I did tidy up the codebase (with the help of PyCharm of course) and that's why you see a big diff.

So, my real changes can actually be traced in the commit messages and are the following:
1. I've made STATIC_ROOT take its value from os.path, so you won't have to edit settings.py by hand and add DionaeaFR's root directory.
2. I've added a new configuration parameter in settings.py called RESULTS_DAYS which denotes how many days worth of data to show (counting backwards from _today_).
3. I've added a context_processors.py file and changed the context of the app so that RESULTS_DAYS is accessible from the templates (since "7 days" was hardcoded in the HTML templates). I then changed the templates to display this dynamic value instead.
4. Minor other changes like changing the timezone to UTC and a couple of additions to .gitignore.