Skip to content
Snippets Groups Projects
Commit ca285cc8 authored by Antoine Lambert's avatar Antoine Lambert
Browse files

last fixes for debian jessie: ensure application execution

parent 5a48a51d
No related branches found
No related tags found
No related merge requests found
......@@ -10,13 +10,17 @@ import argparse
import django
import os
from django.core import management
# need to setup django settings before importing django modules
# with django 1.7 (debian jessie)
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "swh.web.settings") # noqa
from django.core.management.commands.runserver import (
from django.core import management # noqa
from django.core.management.commands.runserver import ( # noqa
Command as runserver
)
from swh.web import config
from swh.web import config # noqa
# Default configuration file
DEFAULT_CONF_FILE = '~/.config/swh/webapp.yml'
......@@ -40,6 +44,5 @@ if __name__ == '__main__':
swh_web_config = config.get_config(config_path)
runserver.default_port = swh_web_config['port']
runserver.default_addr = swh_web_config['host']
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "swh.web.settings")
django.setup()
management.call_command('runserver')
......@@ -18,7 +18,7 @@
{{ docstring | safe_docstring_display | safe }}
</div>
{% endif %}
{% if response_data and response_data is not none %}
{% if response_data %}
<div class="response-data">
<h2>Request</h2>
<pre><strong>{{ request.method }}</strong> {{ request.build_absolute_uri }}</pre>
......@@ -28,7 +28,7 @@
<h3>Status Code</h3>
<pre class="error">{{ status_code }}</pre>
{% endif %}
{% if headers_data and headers_data is not none %}
{% if headers_data %}
<h3>Headers</h3>
{% for header_name, header_value in headers_data.items %}
<pre><strong>{{ header_name }}</strong> {{ header_value | urlize_header_links | safe }}</pre>
......
......@@ -181,3 +181,5 @@ LOGGING = {
},
},
}
SILENCED_SYSTEM_CHECKS = ['1_7.W001']
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment