Skip to content
This repository
tree: 7895b154b9
Fetching contributors…

Octocat-spinner-32-eaf2f5

Cannot retrieve contributors at this time

file 29 lines (21 sloc) 0.723 kb
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 27 28
# coding: utf-8
#
$license

import cyclone.locale
import cyclone.web

from $modname import views
from $modname import config


class Application(cyclone.web.Application):
    def __init__(self, config_file):
        handlers = [
            (r"/", views.IndexHandler),
            (r"/lang/(.+)", views.LangHandler),
        ]

        settings = config.parse_config(config_file)

        # Initialize locales
        locales = settings.get("locale_path")
        if locales:
            cyclone.locale.load_gettext_translations(locales, "$modname")

        #settings["login_url"] = "/auth/login"
        #settings["autoescape"] = None
        cyclone.web.Application.__init__(self, handlers, **settings)
Something went wrong with that request. Please try again.