Skip to content
Snippets Groups Projects
Commit f93de7b6 authored by Nicolas Dandrimont's avatar Nicolas Dandrimont
Browse files

New upstream version 0.0.3

parents 8c68495e 2b27e99c
No related branches found
Tags debian/upstream/0.0.3
No related merge requests found
......@@ -2,3 +2,4 @@ include Makefile
include requirements.txt
include version.txt
recursive-include swh/web/ui/static *
recursive-include swh/web/ui/templates *
Metadata-Version: 1.0
Name: swh.web.ui
Version: 0.0.2
Version: 0.0.3
Summary: Software Heritage Web UI
Home-page: https://forge.softwareheritage.org/diffusion/DWUI/
Author: Software Heritage developers
......
Metadata-Version: 1.0
Name: swh.web.ui
Version: 0.0.2
Version: 0.0.3
Summary: Software Heritage Web UI
Home-page: https://forge.softwareheritage.org/diffusion/DWUI/
Author: Software Heritage developers
......
......@@ -4,6 +4,7 @@
# See top-level LICENSE file for more information
import logging
import os
from flask import Flask
......@@ -42,9 +43,16 @@ def read_config(config_file):
return conf
def load_controllers():
"""Load the controllers for the application"""
from swh.web.ui import controller # flake8: noqa
def run_from_webserver(environ, start_response):
"""Run the WSGI app from the webserver, loading the configuration."""
load_controllers()
config_path = '/etc/softwareheritage/webapp/webapp.ini'
conf = read_config(config_path)
......@@ -52,8 +60,8 @@ def run_from_webserver(environ, start_response):
app.secret_key = conf['secret_key']
app.config['conf'] = conf
handler = logging.StreamHandler()
app.logger.addHandler(handler)
logging.basicConfig(filename=os.path.join(conf['log_dir'], 'web-ui.log'),
level=logging.INFO)
return app(environ, start_response)
......
v0.0.2-0-g636f979
\ No newline at end of file
v0.0.3-0-g2b27e99
\ No newline at end of file
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