# Path: handlers/base.py
# TEMPLATE_PATH = [join(_env.PREFIX, 'templates')]
# MAKO_LOOK_UP = mako.lookup.TemplateLookup(
#     directories=TEMPLATE_PATH,
#     input_encoding='utf-8',
#     output_encoding='utf-8',
#     filesystem_checks=False,
#     encoding_errors='replace',
#     module_directory=join(_env.PREFIX, '_templates'),
# )
# class BaseHandler(RequestHandler):
# class PageNotFoundHandler(BaseHandler):
#     def initialize(self, lookup=MAKO_LOOK_UP):
#     def render_string(self, filename, **kwargs):
#     def render(self, filename, **kwargs):
#     def write_json(self, data_dict):
#     def write_error(self, status_code, **kwargs):
#     def get(self):
# 
# Path: handlers/site.py
# class SiteHandler(BaseHandler):
# class SiteTagHandler(BaseHandler):
#     def initialize(self, class_name):
#     def get(self):
#     def get(self, class_name):
# 
# Path: handlers/user.py
# class UserBaseHandler(BaseHandler):
# class UserMainHandler(UserBaseHandler):
# class UserRegisterHandler(UserBaseHandler):
# class UserLoginHandler(UserBaseHandler):
# class UserLogoutHandler(UserBaseHandler):
#     def get_current_user(self):
#     def get(self):
#     def get(self):
#     def post(self):
#     def get(self):
#     def post(self):
#     def get(self):
# 
# Path: handlers/show.py
# KEY = 'MOBILE'
# SCALE = Img.SCALE
# class ShowHandler(BaseHandler):
# class MobileShowHandler(BaseHandler):
#     def _redis(self):
#     def get(self, *args):
#     def _redis(self):
#     def get(self, *args):
# 
# Path: handlers/mobile.py
# MOBILE_PAGE = Img.MOBILE_PAGE
# class SiteHandler(BaseHandler):
# class SiteTagHandler(BaseHandler):
#     def initialize(self, class_name):
#     def get(self):
#     def get(self, class_name):


from handlers import (
    base, admin, site, user, show,
    leancloud_handler, mobile,
)
from tornado.web import url
url_patterns = [
    # leancloud api
    url(r'/api/data.json', leancloud_handler.LeanClassHandler),

    url(r'/?', site.SiteHandler, dict(class_name='Gifs')),
    #url(r'/?', site.SiteHandler, dict(class_name='Girls')),
    url(r'/show/([\w_]+)/?', show.ShowHandler),
    url(r'/mobile/show/([\w_]+)/?', show.MobileShowHandler),

    url(r'/user/?', user.UserMainHandler),
    url(r'/user/login/?', user.UserLoginHandler),
    url(r'/user/logout/?', user.UserLogoutHandler),
    url(r'/user/register/?', user.UserRegisterHandler),

    # admin
    url(r'/admin/?', admin.AdminMainHandler),
    url(r'/admin/login/?', admin.AdminLoginHandler),
    url(r'/admin/img/solve', admin.ImgDelHandler),
    url(r'/admin/girls/?', admin.AdminSiteHandler, dict(class_name='Girls')),
    url(r'/admin/girls/(\w+-\w+)/?', admin.AdminSiteTagHandler),
    url(r'/admin/boys/?', admin.AdminSiteHandler, dict(class_name='Boys')),
    url(r'/admin/boys/(\w+-\w+)/?', admin.AdminSiteTagHandler),
    url(r'/admin/gifs/?', admin.AdminSiteHandler, dict(class_name='Gifs')),
    url(r'/admin/gifs/(\w+-\w+)/?', admin.AdminSiteTagHandler),
    url(r'/admin/animals/?', admin.AdminSiteHandler, dict(class_name='Animals')),
    url(r'/admin/animals/(\w+-\w+)/?', admin.AdminSiteTagHandler),
    url(r'/admin/nature/?', admin.AdminSiteHandler, dict(class_name='Nature')),

    # site boys
    url(r'/boys/?', site.SiteHandler, dict(class_name='Boys')),

# Path: handlers/base.py
# TEMPLATE_PATH = [join(_env.PREFIX, 'templates')]
# MAKO_LOOK_UP = mako.lookup.TemplateLookup(
#     directories=TEMPLATE_PATH,
#     input_encoding='utf-8',
#     output_encoding='utf-8',
#     filesystem_checks=False,
#     encoding_errors='replace',
#     module_directory=join(_env.PREFIX, '_templates'),
# )
# class BaseHandler(RequestHandler):
# class PageNotFoundHandler(BaseHandler):
#     def initialize(self, lookup=MAKO_LOOK_UP):
#     def render_string(self, filename, **kwargs):
#     def render(self, filename, **kwargs):
#     def write_json(self, data_dict):
#     def write_error(self, status_code, **kwargs):
#     def get(self):
# 
# Path: handlers/site.py
# class SiteHandler(BaseHandler):
# class SiteTagHandler(BaseHandler):
#     def initialize(self, class_name):
#     def get(self):
#     def get(self, class_name):
# 
# Path: handlers/user.py
# class UserBaseHandler(BaseHandler):
# class UserMainHandler(UserBaseHandler):
# class UserRegisterHandler(UserBaseHandler):
# class UserLoginHandler(UserBaseHandler):
# class UserLogoutHandler(UserBaseHandler):
#     def get_current_user(self):
#     def get(self):
#     def get(self):
#     def post(self):
#     def get(self):
#     def post(self):
#     def get(self):
# 
# Path: handlers/show.py
# KEY = 'MOBILE'
# SCALE = Img.SCALE
# class ShowHandler(BaseHandler):
# class MobileShowHandler(BaseHandler):
#     def _redis(self):
#     def get(self, *args):
#     def _redis(self):
#     def get(self, *args):
# 
# Path: handlers/mobile.py
# MOBILE_PAGE = Img.MOBILE_PAGE
# class SiteHandler(BaseHandler):
# class SiteTagHandler(BaseHandler):
#     def initialize(self, class_name):
#     def get(self):
#     def get(self, class_name):


# Path: urls.py
from handlers import (
    base, admin, site, user, show,
    leancloud_handler, mobile,
)
from tornado.web import url

url_patterns = [
    # leancloud api
    url(r'/api/data.json', leancloud_handler.LeanClassHandler),

    url(r'/?', site.SiteHandler, dict(class_name='Gifs')),
    #url(r'/?', site.SiteHandler, dict(class_name='Girls')),
    url(r'/show/([\w_]+)/?', show.ShowHandler),
    url(r'/mobile/show/([\w_]+)/?', show.MobileShowHandler),

    url(r'/user/?', user.UserMainHandler),
    url(r'/user/login/?', user.UserLoginHandler),
    url(r'/user/logout/?', user.UserLogoutHandler),
    url(r'/user/register/?', user.UserRegisterHandler),

    # admin
    url(r'/admin/?', admin.AdminMainHandler),
    url(r'/admin/login/?', admin.AdminLoginHandler),
    url(r'/admin/img/solve', admin.ImgDelHandler),
    url(r'/admin/girls/?', admin.AdminSiteHandler, dict(class_name='Girls')),
    url(r'/admin/girls/(\w+-\w+)/?', admin.AdminSiteTagHandler),
    url(r'/admin/boys/?', admin.AdminSiteHandler, dict(class_name='Boys')),
    url(r'/admin/boys/(\w+-\w+)/?', admin.AdminSiteTagHandler),
    url(r'/admin/gifs/?', admin.AdminSiteHandler, dict(class_name='Gifs')),
    url(r'/admin/gifs/(\w+-\w+)/?', admin.AdminSiteTagHandler),
    url(r'/admin/animals/?', admin.AdminSiteHandler, dict(class_name='Animals')),
    url(r'/admin/animals/(\w+-\w+)/?', admin.AdminSiteTagHandler),
    url(r'/admin/nature/?', admin.AdminSiteHandler, dict(class_name='Nature')),

    # site boys
    url(r'/boys/?', site.SiteHandler, dict(class_name='Boys')),

    url(r'/boys/(\w+-\w+)/?', site.SiteTagHandler),