Skip to content

Commit

Permalink
Separated to mobile/default versions
Browse files Browse the repository at this point in the history
  • Loading branch information
Roman Koblov committed Dec 18, 2010
1 parent fa711bb commit c219983
Show file tree
Hide file tree
Showing 7 changed files with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion main.py
Expand Up @@ -28,11 +28,13 @@
define("host", default='127.0.0.1', help="run on the given address", type=str)
define("port", default=8888, help="run on the given port", type=int)
define("debug", default=False, help="debug mode", type=bool)
define("mobile", default=False, help="mobile version", type=bool)
# Redis
define("redis_host", default='localhost', help="redis host", type=str)
define("redis_port", default=6379, help="redis port", type=int)
define("redis_password", default='', help="redis password", type=str)


class Klipped(tornado.web.Application):
""" Main application class """
def __init__(self):
Expand All @@ -52,8 +54,10 @@ def __init__(self):
]
# Settings
settings = {'debug': options.debug,
'template_path': os.path.join(os.path.dirname(__file__), "views")
'template_path': os.path.join(os.path.dirname(__file__), "views/default")
}
if options.mobile:
settings['template_path'] = os.path.join(os.path.dirname(__file__), "views/mobile")
super(Klipped, self).__init__(handlers=handlers, **settings)

def listen(self, port, address="", **kwargs):
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit c219983

Please sign in to comment.