forked from renefritze/spring-infolog
-
Notifications
You must be signed in to change notification settings - Fork 1
/
details.py
27 lines (23 loc) · 748 Bytes
/
details.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
# -*- coding: utf-8 -*-
from bottle import route,request
from siteglobals import env, db, config
from utils import *
from backend import Crash
@route('/details', method='GET')
def output():
try:
important_settings = ['Shadows']
session = db.sessionmaker()
id = getSingleField( 'id', request )
if not id:
raise ElementNotFoundException( id )
crash = session.query( Crash ).filter( Crash.id == id ).one()
if not crash:
raise ElementNotFoundException( id )
upload_dir = config.get('site','uploads')
print crash.stacktrace
ret = env.get_template('details.html').render( crash=crash, upload_dir=upload_dir )
session.close()
return ret
except Exception, m:
return env.get_template('error.html').render(err_msg=str(m))