Skip to content

Commit

Permalink
Heroku should inherit from the production config
Browse files Browse the repository at this point in the history
  • Loading branch information
smallwat3r committed Nov 18, 2023
1 parent b82056e commit da17b36
Showing 1 changed file with 6 additions and 9 deletions.
15 changes: 6 additions & 9 deletions shhh/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,21 +92,18 @@ class DevelopmentConfig(DefaultConfig):
SQLALCHEMY_ECHO = False


class HerokuConfig(DefaultConfig):
"""Heroku configuration (heroku)."""
class ProductionConfig(DefaultConfig):
"""Production configuration (production)."""

DEBUG = False
SQLALCHEMY_ECHO = False


class HerokuConfig(ProductionConfig):
"""Heroku configuration (heroku)."""

# SQLAlchemy 1.4 removed the deprecated postgres dialect name, the name
# postgresql must be used instead. This URL is automatically set on
# Heroku, so change it from the code directly.
SQLALCHEMY_DATABASE_URI = os.environ.get("DATABASE_URL", "").replace(
"postgres://", "postgresql://", 1)


class ProductionConfig(DefaultConfig):
"""Production configuration (production)."""

DEBUG = False
SQLALCHEMY_ECHO = False

0 comments on commit da17b36

Please sign in to comment.