Revision 3ba83d8b
Améliorations cosméthiques/pratiques dans VigiBoard.
git-svn-id: https://vigilo-dev.si.c-s.fr/svn@2111 b22e2e97-25c9-44ff-b637-2e5ceca36478
vigiboard/controllers/root.py | ||
---|---|---|
86 | 86 |
|
87 | 87 |
username = request.environ['repoze.who.identity']['repoze.who.userid'] |
88 | 88 |
user = User.by_user_name(username) |
89 |
|
|
89 |
|
|
90 | 90 |
aggregates = VigiboardRequest(user) |
91 | 91 |
aggregates.add_table( |
92 | 92 |
CorrEvent, |
... | ... | |
150 | 150 |
|
151 | 151 |
if from_date: |
152 | 152 |
search['from_date'] = from_date |
153 |
# TRANSLATORS: Format de date et heure. |
|
154 | 153 |
try: |
154 |
# TRANSLATORS: Format de date et heure. |
|
155 | 155 |
from_date = datetime.strptime( |
156 | 156 |
from_date, _('%Y-%m-%d %I:%M:%S %p')) |
157 | 157 |
except ValueError: |
... | ... | |
160 | 160 |
|
161 | 161 |
if to_date: |
162 | 162 |
search['to_date'] = to_date |
163 |
# TRANSLATORS: Format de date et heure. |
|
164 | 163 |
try: |
164 |
# TRANSLATORS: Format de date et heure. |
|
165 | 165 |
to_date = datetime.strptime( |
166 | 166 |
to_date, _('%Y-%m-%d %I:%M:%S %p')) |
167 | 167 |
except ValueError: |
vigiboard/websetup.py | ||
---|---|---|
22 | 22 |
pour initialiser la base de données de VigiBoard. |
23 | 23 |
""" |
24 | 24 |
from paste.script.appinstall import SetupCommand |
25 |
import os.path |
|
25 |
import os.path, os
|
|
26 | 26 |
|
27 |
ini_file = '/etc/vigilo/vigiboard/settings.ini' |
|
28 |
ini_file = os.path.join('/', *ini_file.split('/')) |
|
27 |
if os.environ['VIGILO_SETTINGS']: |
|
28 |
ini_file = os.environ['VIGILO_SETTINGS'] |
|
29 |
else: |
|
30 |
ini_file = '/etc/vigilo/vigiboard/settings.ini' |
|
29 | 31 |
|
30 | 32 |
cmd = SetupCommand('setup-app') |
31 | 33 |
cmd.run([ini_file]) |
Also available in: Unified diff