def main(): logging.getLogger().setLevel(logging.DEBUG) publish_urls = [('/', MainPage), ('/img', ImageServe), ('/vote', Vote), ('/skip', Skip), ('/share', Share), ('/feed', Feed), ('/enter', Entrance), ('/data', DataHandler), ('/logout', Logout)] # in pre-production extend the publish list with the test URLs if chill_config.isDebug(): publish_urls.extend([('/tests/login', LoginScaffolding), ('/tests/image', ImageServeScaffolding)]) application = webapp.WSGIApplication(publish_urls, chill_config.isDebug()) application = chill_config.add_middleware(application) run_wsgi_app(application)
from config import chill_config REDDIT_PICS = "http://reddit.com/r/pics" REDDIT_FUNNY = "http://reddit.com/r/funny" REDDIT_WTF = "http://reddit.com/r/wtf" REDDIT_ADVICE_ANIMALS = "http://reddit.com/r/adviceanimals" REDDIT_GIF = "http://reddit.com/r/gif" sources_list = [REDDIT_PICS, REDDIT_FUNNY, REDDIT_GIF, REDDIT_WTF, REDDIT_ADVICE_ANIMALS] REQUEST_ACTION_VOTE = 'vote' REQUEST_ACTION_SKIP = 'skip' REQUEST_ACTION_SHARE = 'share' REQUEST_ACTION_REPORT = 'report' REQUEST_ACTION_UPLOAD = 'upload' request_actions_list = [REQUEST_ACTION_VOTE, REQUEST_ACTION_SKIP, REQUEST_ACTION_SHARE, REQUEST_ACTION_REPORT, REQUEST_ACTION_UPLOAD] # URL configuration if chill_config.isDebug(): BASE_URL = 'http://localhost:8080/' else: BASE_URL = 'http://www.chillbrain.com/' SHARE_URL = BASE_URL + "enter?" IMG_URL = BASE_URL + "img?" IMG_URL_TEMPLATE = IMG_URL + "h=%s" LOGIN_REDIRECT_URL = BASE_URL + ""