PageRenderTime 56ms CodeModel.GetById 29ms RepoModel.GetById 0ms app.codeStats 0ms

/sys2do/setting.py

https://github.com/LamCiuLoeng/BookStore
Python | 42 lines | 30 code | 4 blank | 8 comment | 0 complexity | 8a2a766bca60b4adfb918d7cc9b7d23c MD5 | raw file
  1. # -*- coding: utf-8 -*-
  2. '''
  3. ###########################################
  4. # Created on 2011-9-1
  5. # @author: cl.lam
  6. # Description:
  7. ###########################################
  8. '''
  9. import os
  10. import logging
  11. __all__ = ["app_setting", ]
  12. app_dir = os.path.dirname(__file__)
  13. app_setting = {
  14. "tornado_setting" : {
  15. "static_path": os.path.join(app_dir, "public"),
  16. "static_url_prefix" : "/public/",
  17. "cookie_secret": "61oETzKXQAGaYdkL5gEmGeJJFuYh7EQnp2XdTP1o/Vo=",
  18. "login_url": "/auth?action=login",
  19. "template_path" : os.path.join(app_dir, "templates"),
  20. "debug" : True,
  21. "xsrf_cookies": True,
  22. "upload_relative_path" : "upload",
  23. },
  24. "addition_setting" : {
  25. "template_path_cache" : os.path.join(app_dir, "templates_cache"),
  26. "logger_level" : logging.INFO,
  27. "server_ip" : "localhost",
  28. "port" : 8888,
  29. "i18n_dir" : os.path.join(app_dir, "i18n")
  30. },
  31. "session_setting" : {
  32. "secret" : "123321",
  33. "session_dir" : os.path.join(app_dir, "session"),
  34. },
  35. "db_setting" : {
  36. "SQLALCHEMY_DATABASE_URI" : 'sqlite:///%s' % (os.path.join(app_dir, "database.db"))
  37. }
  38. }