source: gutenbach-web/root.py @ 84ed773

debianmacno-cupsweb
Last change on this file since 84ed773 was 84ed773, checked in by Edward Z. Yang <edwardzyang@…>, 16 years ago

Remove scaffolding we don't know, implement volume output.

Signed-off-by: Edward Z. Yang <edwardzyang@…>

  • Property mode set to 100644
File size: 856 bytes
Line 
1"""Main Controller"""
2from sipbmp3web.lib.base import BaseController
3from tg import expose, flash, require, url, request, redirect
4from pylons.i18n import ugettext as _
5#from tg import redirect, validate
6from sipbmp3web.model import DBSession, metadata
7from sipbmp3web.controllers.error import ErrorController
8from sipbmp3web import model
9from catwalk.tg2 import Catwalk
10from repoze.what import predicates
11from sipbmp3web.controllers.secure import SecureController
12from remctl import remctl
13
14class RootController(BaseController):
15    admin = Catwalk(model, DBSession)
16    error = ErrorController()
17
18    @expose('sipbmp3web.templates.index')
19    def index(self):
20        out = dict()
21        out["volume"] = remctl("zsr", command=["v", "get"]).stdout
22        return out
23
24    @expose('sipbmp3web.templates.about')
25    def about(self):
26        return dict()
27
Note: See TracBrowser for help on using the repository browser.