From 86fbc26647d92809ca185f2000716172e398a323 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rub=C3=A9n=20Espadas?= Date: Tue, 3 Nov 2015 00:39:43 +0100 Subject: [PATCH] * Changed web settings (Based on: Two Scoops of Django 1.8). * Fixed static urls on templates: https://docs.djangoproject.com/en/1.8/howto/static-files/ * Local and Production requirements. --- .travis.yml | 2 +- requirements.txt => requirements/base.txt | 1 + requirements/local.txt | 4 ++ requirements/production.txt | 2 + web/manage.py | 2 +- web/templates/analysis/index.html | 7 +-- web/templates/analysis/network/_tcp.html | 7 +-- web/templates/analysis/network/_udp.html | 3 +- web/templates/analysis/pending.html | 3 +- web/templates/analysis/report.html | 3 +- web/templates/analysis/search.html | 5 +- web/templates/api/index.html | 3 +- web/templates/compare/both.html | 5 +- web/templates/compare/hash.html | 3 +- web/templates/compare/left.html | 3 +- web/templates/dashboard/index.html | 3 +- web/templates/error.html | 5 +- web/templates/footer.html | 15 +++--- web/templates/header.html | 11 ++-- web/templates/statistics/index.html | 15 +++--- web/templates/submission/complete.html | 3 +- web/templates/submission/index.html | 3 +- web/templates/submission/status.html | 3 +- web/templates/success.html | 3 +- web/templates/success_simple.html | 5 +- web/web/local_settings.py | 38 -------------- web/web/settings/__init__.py | 0 web/web/{settings.py => settings/base.py} | 63 ++++++++++++----------- web/web/settings/local.py | 20 +++++++ web/web/settings/production.py | 14 +++++ 30 files changed, 140 insertions(+), 114 deletions(-) rename requirements.txt => requirements/base.txt (92%) create mode 100644 requirements/local.txt create mode 100644 requirements/production.txt delete mode 100644 web/web/local_settings.py create mode 100644 web/web/settings/__init__.py rename web/web/{settings.py => settings/base.py} (86%) mode change 100755 => 100644 create mode 100644 web/web/settings/local.py create mode 100644 web/web/settings/production.py diff --git a/.travis.yml b/.travis.yml index ee5902549..2c9b98abd 100644 --- a/.travis.yml +++ b/.travis.yml @@ -14,7 +14,7 @@ before_install: - sudo make install - cd .. install: - - pip install -r requirements.txt + - pip install -r requirements/local.txt script: - python cuckoo.py --debug --test - nosetests diff --git a/requirements.txt b/requirements/base.txt similarity index 92% rename from requirements.txt rename to requirements/base.txt index aba386d41..1c67b3856 100644 --- a/requirements.txt +++ b/requirements/base.txt @@ -10,3 +10,4 @@ nose jsbeautifier pygal dnspython +unipath diff --git a/requirements/local.txt b/requirements/local.txt new file mode 100644 index 000000000..2031a0db3 --- /dev/null +++ b/requirements/local.txt @@ -0,0 +1,4 @@ +-r base.txt +Werkzeug +django-extensions +django-debug-toolbar diff --git a/requirements/production.txt b/requirements/production.txt new file mode 100644 index 000000000..996b2fa8f --- /dev/null +++ b/requirements/production.txt @@ -0,0 +1,2 @@ +-r base.txt +gunicorn diff --git a/web/manage.py b/web/manage.py index 81232ff99..f2c980540 100755 --- a/web/manage.py +++ b/web/manage.py @@ -7,7 +7,7 @@ import sys if __name__ == "__main__": - os.environ.setdefault("DJANGO_SETTINGS_MODULE", "web.settings") + os.environ.setdefault("DJANGO_SETTINGS_MODULE", "web.settings.production") from django.core.management import execute_from_command_line diff --git a/web/templates/analysis/index.html b/web/templates/analysis/index.html index 9e3316198..b95f0d5eb 100644 --- a/web/templates/analysis/index.html +++ b/web/templates/analysis/index.html @@ -1,6 +1,7 @@ {% extends "base.html" %} +{% load staticfiles %} {% block content %} -

+