Skip to content

Commit

Permalink
Fix ccs in admin
Browse files Browse the repository at this point in the history
  • Loading branch information
MathieuMoalic committed Mar 7, 2024
1 parent a472dfc commit e6d7118
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions manager/amuman/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,13 @@
from rich.logging import RichHandler

DEBUG = os.environ.get("DEBUG", "True") != "FALSE"

if DEBUG:
ALLOWED_HOSTS = ["*"]
SECRET_KEY = "django-insecure-i-(^@udvkc6^^9mkwpn&8kk0!u0n-bn4$b4mfbii1(bzw_pq@"
LOGLEVEL = "DEBUG"
CORS_ALLOW_ALL_ORIGINS = True
else:
ALLOWED_HOSTS = [os.environ["DOMAIN_URL"], "amuman-manager-staging"]
ALLOWED_HOSTS = [os.environ["DOMAIN_URL"], "amuman-manager-staging" "localhost" "*"]
SECRET_KEY = os.environ["SECRET_KEY"]
LOGLEVEL = "INFO"
SESSION_COOKIE_SECURE = True
Expand Down Expand Up @@ -55,12 +54,21 @@
"django.contrib.contenttypes",
"django.contrib.sessions",
"django.contrib.messages",
"django.contrib.staticfiles",
"rest_framework",
"rest_framework_simplejwt.token_blacklist",
"drf_spectacular",
"channels",
]

# Needed for the admin panel
STATIC_URL = "/static/"
STATICFILES_DIRS = [
os.path.join(BASE_DIR, "manager/static"),
]
STATIC_ROOT = os.path.join(BASE_DIR, "staticfiles")


CHANNEL_LAYERS = {
"default": {
"BACKEND": "channels_redis.core.RedisChannelLayer",
Expand Down

0 comments on commit e6d7118

Please sign in to comment.