Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions config/settings/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,8 @@
"default": env.db("DATABASE_URL", default="postgres:///teleband"),
}
DATABASES["default"]["ATOMIC_REQUESTS"] = True
DATABASES["default"]["OPTIONS"] = {"pool": True}

# https://docs.djangoproject.com/en/stable/ref/settings/#std:setting-DEFAULT_AUTO_FIELD
DEFAULT_AUTO_FIELD = "django.db.models.BigAutoField"

Expand Down
11 changes: 10 additions & 1 deletion config/settings/local.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,16 @@
"default": env.db("DATABASE_URL", default="sqlite:///db.sqlite"),
}
# https://docs.djangoproject.com/en/dev/ref/settings/#allowed-hosts
ALLOWED_HOSTS = env.list("ALLOWED_HOSTS", default=["localhost", "0.0.0.0", "127.0.0.1", "dev-api.musiccpr.org", "api.musiccpr.org"])
ALLOWED_HOSTS = env.list(
"ALLOWED_HOSTS",
default=[
"localhost",
"0.0.0.0",
"127.0.0.1",
"dev-api.musiccpr.org",
"api.musiccpr.org",
],
)

# CACHES
# ------------------------------------------------------------------------------
Expand Down
5 changes: 4 additions & 1 deletion config/settings/production.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,10 @@
# https://docs.djangoproject.com/en/dev/ref/settings/#secret-key
SECRET_KEY = env("DJANGO_SECRET_KEY")
# https://docs.djangoproject.com/en/dev/ref/settings/#allowed-hosts
ALLOWED_HOSTS = env.list("DJANGO_ALLOWED_HOSTS", default=["https://tele.band", "dev-api.musiccpr.org", "api.musiccpr.org"])
ALLOWED_HOSTS = env.list(
"DJANGO_ALLOWED_HOSTS",
default=["https://tele.band", "dev-api.musiccpr.org", "api.musiccpr.org"],
)

# DATABASES
# ------------------------------------------------------------------------------
Expand Down
2 changes: 1 addition & 1 deletion requirements/local.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

Werkzeug==3.0.3 # https://github.com/pallets/werkzeug
ipdb==0.13.13 # https://github.com/gotcha/ipdb
psycopg2-binary==2.9.9 # https://github.com/psycopg/psycopg2
psycopg[binary]>=3.0.0 # https://github.com/psycopg/psycopg
watchgod==0.8.2 # https://github.com/samuelcolvin/watchgod

# Testing
Expand Down
2 changes: 1 addition & 1 deletion requirements/production.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

wheel==0.43.0 # https://idk
gunicorn==22.0.0 # https://github.com/benoitc/gunicorn
psycopg2-binary==2.9.9 # https://github.com/psycopg/psycopg2
psycopg[binary]>=3.0.0 # https://github.com/psycopg/psycopg
Collectfast==2.2.0 # https://github.com/antonagestam/collectfast

boto3==1.34.145
Expand Down