config.py 1.4 KB

123456789101112131415161718192021222324252627282930
  1. from os import urandom
  2. from os.path import abspath, join, dirname
  3. from flask_babel import gettext
  4. from flask import url_for
  5. LANGUAGES = { # Languages list (key must be the language and the value must be it's direction)
  6. gettext('English') :'LTR',
  7. gettext('Arabic') :'RTL'
  8. }
  9. PAGES = { # Pages in pages menu in website's navbar
  10. gettext('Bug tracker') :'https://urukproject.org/bt/login_page.php',
  11. gettext('Contribute') :'https://urukproject.org/en/contribute.html',
  12. gettext('Dist') :'https://urukproject.org/dist',
  13. gettext('Home') :'https://urukproject.org/',
  14. gettext('Blog') :'https://blog.urukproject.org/',
  15. gettext('Wiki') :'/'
  16. }
  17. ALLOWED_EXTENSIONS = set(['png', 'jpg', 'jpeg', 'gif']) # Allowed images extensions
  18. DEFAULT_LANGUAGE = 'EN'
  19. FAVICON = 'images/urukp.png'
  20. FOOTER_MESSAGE = gettext('© 2017 Uruk GNU/Linux • Website Code distributed under the AGPLv3+ • Website media licensed under CC BY-SA 4.')
  21. MAX_CONTENT_PATH = 16 * 1024 * 1024
  22. SECRET_KEY = urandom(24) # Secret Key
  23. SQLALCHEMY_TRACK_MODIFICATIONS = True
  24. UPLOAD_FOLDER = join(dirname(abspath(__file__)), 'wiki/static/') # Upload folder
  25. WEBSITE_LOGO = gettext('images/logo-e.png')
  26. WEBSITE_NAME = gettext('Uruk Wiki')
  27. WEBSITE_KEYWORDS = gettext('uruk, wiki, uruk wiki, uruk project, uruk linux, linux, URUK, URUK PROJECT') # Website Keywords (for SEO)
  28. FRONT_PAGE = gettext('index') # Front Page url, set to False if none