Beispiel #1
0
def intelapp(environ, start_response):
    URLCONF = [
        ('/stats/', view_stats),
        ('/submit/', view_submit),
        ('/', view_listing)
        ]
    return kgi.dispatch(environ, start_response, URLCONF)
Beispiel #2
0
def opsapp(environ, start_response):
    URLCONF = [
        ('^/window/', view_window),
        ('^/oplist/', view_oplist),
        ('^/', view_info),
        ]
    return kgi.dispatch(environ, start_response, URLCONF)
def standingsapp(environ, start_response):
    URLCONF = [
        ('^/check/', standings_check),
        ('^/rc/', view_rc),
        ('^/crimes/', view_crimes),
        ('^/$', view_standings)
    ]
    return kgi.dispatch(environ, start_response, URLCONF)
def forumsapp(environ, start_response):
    """
    Main application interface. Dispatch over pages.
    """
    URLCONF = [
        ('^/reputation/', view_reputation),
    ]
    return kgi.dispatch(environ, start_response, URLCONF)
Beispiel #5
0
def grdapp(environ, start_response):
    URLCONF = [
        ('^/prices/', view_prices),
        ('^/members/', view_members),
        ('^/voters/', view_voters),
        ('^/production/', view_price_comparison),
        ('^/orders/', view_market),
        ('^/pi/', view_pi),
        ('^/', view_main),
        ]
    return kgi.dispatch(environ, start_response, URLCONF)
Beispiel #6
0
def authapp(environ, start_response):
    """
    Main application interface. Dispatch over pages.
    """
    URLCONF = [
        ('^/check/', view_check),
        ('^/update/', view_auth),
        ('^/faq/', view_faq),
        ('^/corp/', view_corp),
        ('^/channels/', view_channels),
        ('^/avatar/', view_updateavatar),
        ('^/', view_info),
    ]
    return kgi.dispatch(environ, start_response, URLCONF)
Beispiel #7
0
def emapps(environ, start_response):
    log = logging.getLogger()
    log.setLevel(logging.DEBUG)
    dbh = DBLogHandler()
    dbh.setLevel(logging.DEBUG)
    formatter = logging.Formatter("%(asctime)s %(name)-10s %(levelname)-10s "
                                  "%(message)s",
                                  "%Y-%m-%d %H:%M:%S")
    dbh.setFormatter(formatter)
    log.addHandler(dbh)

    environ['emapps.user'] = User(*mybb_auth.mybb_auth())
    app = wsgiref.util.shift_path_info(environ)
    if app == 'apps':
        data = kgi.dispatch(environ, start_response,
                            [('', lambda environ: kgi.template_response('apps.html', user=environ["emapps.user"]))])
    elif app == 'standings':
        import standings
        data = standings.standingsapp(environ, start_response)
    elif app == 'intel':
        import intel
        data = intel.intelapp(environ, start_response)
    elif app == 'market':
        import market
        data = market.marketapp(environ, start_response)
    elif app == 'oldadmin':
        import admin
        data = admin.adminapp(environ, start_response)
    elif app == 'gradient':
        import gradient
        data = gradient.grdapp(environ, start_response)
    elif app == 'gallery':
        import gallery
        data = gallery.galleryapp(environ, start_response)
    elif app == 'forumtools':
        import forums
        data = forums.forumsapp(environ, start_response)
    else:
        start_response('404 Not Found', [('Content-Type', 'text/html')])
        data = notfound().encode("utf-8")
    return data
Beispiel #8
0
def galleryapp(environ, start_response):
    URLCONF = [
        ('^/rc/', view_recentcomments),
        ('^/(.*)', view_gallery),
    ]
    return kgi.dispatch(environ, start_response, URLCONF)
Beispiel #9
0
def marketapp(environ, start_response):
    URLCONF = [
        ('^/reimbursementfund/', view_rfund),
        ('^/', view_rfund),
    ]
    return kgi.dispatch(environ, start_response, URLCONF)