default_config.py 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. # vim:fileencoding=utf-8
  2. # Go Working - Controle das Mesas
  3. #
  4. # Copyright (C) 2019-2020 Fábrica do Futuro
  5. #
  6. # This program is free software: you can redistribute it and/or modify
  7. # it under the terms of the GNU General Public License as published by
  8. # the Free Software Foundation, either version 3 of the License, or
  9. # (at your option) any later version.
  10. #
  11. # This program is distributed in the hope that it will be useful,
  12. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  13. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  14. # GNU General Public License for more details.
  15. #
  16. # You should have received a copy of the GNU General Public License
  17. # along with this program. If not, see <http://www.gnu.org/licenses/>.
  18. #
  19. ## Copiar este arquivo para instance/config.py e editar lá
  20. ## Não usar objetos, definir as variáveis tão somente
  21. ##
  22. ## Por exemplo:
  23. ## DEBUG = False
  24. ##
  25. ## ao invés de:
  26. ## class Config(object):
  27. ## DEBUG = False
  28. import os
  29. basedir = os.path.abspath(os.path.dirname(__file__))
  30. class Config(object):
  31. DEBUG = False
  32. TESTING = False
  33. SECRET_KEY = "sou um seixo rolado na estrada do lado de la do sertao"
  34. WTF_CSRF_SECRET_KEY = "e ser tao humilhado e sinal de que o diabo e que amassa o meu pao"
  35. SQLALCHEMY_DATABASE_URI = os.environ.get('DATABASE_URL') or 'sqlite:///' + os.path.join(basedir, 'instance', 'app.db')
  36. ## The SQLALCHEMY_TRACK_MODIFICATIONS configuration option is set to False to disable a feature of Flask-SQLAlchemy that I do not need, which is to signal the application every time a change is about to be made in the database.
  37. SQLALCHEMY_TRACK_MODIFICATIONS = False
  38. class ProductionConfig(Config):
  39. SECRET_KEY = "mas meu corpo e discente e civilizada a mente toca cheira ouve e ve"
  40. WTF_CSRF_SECRET_KEY = "e com amor e anarquia goza que rosca e arrepia rock en rolando em voce"
  41. SQLALCHEMY_DATABASE_URI = os.environ.get('DATABASE_URL') or 'mysql+pymysql://goworking:goworking@localhost/goworking'
  42. class DevelopmentConfig(Config):
  43. DEBUG = True
  44. SQLALCHEMY_DATABASE_URI = os.environ.get('DATABASE_URL') or 'sqlite:///' + os.path.join(basedir, 'instance', 'goworking.db')
  45. class TestingConfig(Config):
  46. TESTING = True
  47. SECRET_KEY = "no corpo rosa dos ventos tudo e norte tudo e sul"
  48. WTF_CSRF_SECRET_KEY = "se oriente se ocidente toda cor corre pro azul"
  49. SQLALCHEMY_DATABASE_URI = os.environ.get('DATABASE_URL') or 'mysql+pymysql://gotesting:gotesting@localhost/gotesting'