import other kontor repos into directories
This commit is contained in:
committed by
Thomas Peetz
parent
28746adfbb
commit
b424e95e05
@@ -0,0 +1,28 @@
|
||||
# -*- coding:utf-8 -*-
|
||||
import pymongo
|
||||
import bottle
|
||||
import cgi
|
||||
|
||||
|
||||
__author__ = 'tpeetz'
|
||||
|
||||
|
||||
class Plugin:
|
||||
|
||||
def __init__(self, app, database, sessions):
|
||||
self.app = app
|
||||
self.db = database
|
||||
self.sessions = sessions
|
||||
self.routing()
|
||||
|
||||
|
||||
def routing(self):
|
||||
self.app.route('/office', 'GET', self.office_index)
|
||||
self.app.route('/office/travel', 'GET', self.office_index)
|
||||
|
||||
|
||||
def office_index(self):
|
||||
cookie = bottle.request.get_cookie("session")
|
||||
username = self.sessions.get_username(cookie)
|
||||
return bottle.template('office_index', dict(username=username))
|
||||
|
||||
Reference in New Issue
Block a user