Mercurial > kraina_muminkow
comparison frontend/mfrontend/__init__.py @ 9:9a0a9fa7f91d
Dodałem prototyp listy zadań w systemie
author | Michał Rudowicz <michal.rudowicz@fl9.eu> |
---|---|
date | Mon, 28 Feb 2011 19:25:51 +0100 |
parents | e0061735c327 |
children | 69ecfe51d585 |
comparison
equal
deleted
inserted
replaced
8:e00d04093c60 | 9:9a0a9fa7f91d |
---|---|
2 # -*- coding: utf-8 -*- | 2 # -*- coding: utf-8 -*- |
3 | 3 |
4 import flask | 4 import flask |
5 from ConfigParser import SafeConfigParser, NoSectionError | 5 from ConfigParser import SafeConfigParser, NoSectionError |
6 from mfrontend.views.frontend import frontend | 6 from mfrontend.views.frontend import frontend |
7 from mfrontend.views.jobcontrol import jobcontrol | |
7 from mfrontend import db, utils | 8 from mfrontend import db, utils |
8 | 9 |
9 | 10 |
10 #-- konfiguracja | 11 #-- konfiguracja |
11 config = SafeConfigParser() | 12 config = SafeConfigParser() |
20 utils.default_ini() | 21 utils.default_ini() |
21 #-- koniec konfiguracji | 22 #-- koniec konfiguracji |
22 | 23 |
23 app = flask.Flask(__name__) | 24 app = flask.Flask(__name__) |
24 app.register_module(frontend) | 25 app.register_module(frontend) |
26 app.register_module(jobcontrol, url_prefix="/jobs") | |
25 app.config.from_object(__name__) | 27 app.config.from_object(__name__) |
26 app.config.from_envvar('MFRONTEND_SETTINGS', silent=True) | 28 app.config.from_envvar('MFRONTEND_SETTINGS', silent=True) |
27 | 29 |
28 @app.before_request | 30 @app.before_request |
29 def before_request(): | 31 def before_request(): |