La version 5 de Planète Casio. Regroupe le forum, les programmes, les tutoriel, les sprites et tous les autres outils développés par nos soins.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

config.py 1.0KB

1234567891011121314151617181920212223242526272829
  1. import os
  2. import datetime
  3. from local_config import DB_NAME
  4. class Config(object):
  5. SECRET_KEY = os.environ.get('SECRET_KEY') or 'a-random-secret-key'
  6. SQLALCHEMY_DATABASE_URI = os.environ.get('DATABASE_URL') or \
  7. 'postgresql+psycopg2://' + os.environ.get('USER') + ':@/' + DB_NAME
  8. SQLALCHEMY_TRACK_MODIFICATIONS = False
  9. UPLOAD_FOLDER = './app/static/avatars'
  10. class V5Config(object):
  11. # Length allocated to privilege names (slugs)
  12. PRIVS_MAXLEN = 64
  13. # Forbidden user names
  14. FORBIDDEN_USERNAMES = ["admin", "root", "webmaster", "contact"]
  15. # Unauthorized message (@priv_required)
  16. UNAUTHORIZED_MSG = "Vous n'avez pas l'autorisation d'effectuer cette action !"
  17. # Minimum and maximum user name length
  18. USER_NAME_MINLEN = 3
  19. USER_NAME_MAXLEN = 32
  20. # Minimum password length for new users and new passwords
  21. PASSWORD_MINLEN = 10
  22. # Maximum thread name length
  23. THREAD_NAME_MAXLEN = 32
  24. # Remember-me cookie duration time
  25. REMEMBER_COOKIE_DURATION = datetime.timedelta(days=7)