Fix old code

This commit is contained in:
Andros Fenollosa 2023-07-21 10:07:51 +02:00
parent 2f6a158e81
commit 516483c865
11 changed files with 14 additions and 14 deletions

View File

@ -1,6 +1,6 @@
from django.apps import AppConfig
class WebsiteConfig(AppConfig):
class PublicConfig(AppConfig):
default_auto_field = "django.db.models.BigAutoField"
name = "apps.website"
name = "app.public"

View File

@ -1,7 +1,7 @@
from django.urls import path
from apps.website.views import home
from app.public.views import home
urlpatterns = [
path("", home, name="home"),
]
]

View File

@ -24,14 +24,9 @@ BASE_DIR = Path(__file__).resolve().parent.parent
# SECURITY WARNING: keep the secret key used in production secret!
SECRET_KEY = os.environ.get("SECRET_KEY")
# SECURITY WARNING: don't run with debug turned on in production!
DEBUG = os.environ.get("DEBUG", "True") == "True"
DEBUG = os.environ.get("DEBUG", "True").lower() == "true"
ALLOWED_HOSTS = os.environ.get("ALLOWED_HOSTS").split(",")
ALLOWED_HOSTS = []
# ALLOWED_HOSTS = os.environ.get("ALLOWED_HOSTS").split(",")
if not os.environ.get("ALLOWED_HOSTS") == None:
ALLOWED_HOSTS = os.environ.get("ALLOWED_HOSTS").split(",")
# Application definition
@ -44,7 +39,7 @@ INSTALLED_APPS = [
"django.contrib.staticfiles",
"django_extensions",
"rest_framework",
"apps.website",
"app.public",
]
MIDDLEWARE = [

View File

@ -17,6 +17,6 @@ from django.contrib import admin
from django.urls import path, include
urlpatterns = [
path("", include("apps.website.urls")),
path("", include("app.public.urls")),
path("admin/", admin.site.urls),
]

View File

@ -1,10 +1,15 @@
PROJECT_NAME=project
# Django
DJANGO_SECRET_KEY=mysecret
DEBUG=True
SECRET_KEY=mysecret
DOMAIN=project.localhost
DOMAIN_URL=http://project.localhost
ALLOWED_HOSTS=project.localhost,localhost
STATIC_ROOT=static
STATIC_URL=/static/
MEDIA_ROOT=media
MEDIA_URL=/media/
# Captcha
HCAPTCHA_ENABLED=False