Fix old code
This commit is contained in:
parent
2f6a158e81
commit
516483c865
@ -1,6 +1,6 @@
|
|||||||
from django.apps import AppConfig
|
from django.apps import AppConfig
|
||||||
|
|
||||||
|
|
||||||
class WebsiteConfig(AppConfig):
|
class PublicConfig(AppConfig):
|
||||||
default_auto_field = "django.db.models.BigAutoField"
|
default_auto_field = "django.db.models.BigAutoField"
|
||||||
name = "apps.website"
|
name = "app.public"
|
@ -1,6 +1,6 @@
|
|||||||
from django.urls import path
|
from django.urls import path
|
||||||
|
|
||||||
from apps.website.views import home
|
from app.public.views import home
|
||||||
|
|
||||||
urlpatterns = [
|
urlpatterns = [
|
||||||
path("", home, name="home"),
|
path("", home, name="home"),
|
@ -24,15 +24,10 @@ BASE_DIR = Path(__file__).resolve().parent.parent
|
|||||||
# SECURITY WARNING: keep the secret key used in production secret!
|
# SECURITY WARNING: keep the secret key used in production secret!
|
||||||
SECRET_KEY = os.environ.get("SECRET_KEY")
|
SECRET_KEY = os.environ.get("SECRET_KEY")
|
||||||
|
|
||||||
# SECURITY WARNING: don't run with debug turned on in production!
|
DEBUG = os.environ.get("DEBUG", "True").lower() == "true"
|
||||||
DEBUG = os.environ.get("DEBUG", "True") == "True"
|
|
||||||
|
|
||||||
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(",")
|
ALLOWED_HOSTS = os.environ.get("ALLOWED_HOSTS").split(",")
|
||||||
|
|
||||||
|
|
||||||
# Application definition
|
# Application definition
|
||||||
|
|
||||||
INSTALLED_APPS = [
|
INSTALLED_APPS = [
|
||||||
@ -44,7 +39,7 @@ INSTALLED_APPS = [
|
|||||||
"django.contrib.staticfiles",
|
"django.contrib.staticfiles",
|
||||||
"django_extensions",
|
"django_extensions",
|
||||||
"rest_framework",
|
"rest_framework",
|
||||||
"apps.website",
|
"app.public",
|
||||||
]
|
]
|
||||||
|
|
||||||
MIDDLEWARE = [
|
MIDDLEWARE = [
|
||||||
|
@ -17,6 +17,6 @@ from django.contrib import admin
|
|||||||
from django.urls import path, include
|
from django.urls import path, include
|
||||||
|
|
||||||
urlpatterns = [
|
urlpatterns = [
|
||||||
path("", include("apps.website.urls")),
|
path("", include("app.public.urls")),
|
||||||
path("admin/", admin.site.urls),
|
path("admin/", admin.site.urls),
|
||||||
]
|
]
|
||||||
|
@ -1,10 +1,15 @@
|
|||||||
PROJECT_NAME=project
|
PROJECT_NAME=project
|
||||||
|
|
||||||
# Django
|
# Django
|
||||||
DJANGO_SECRET_KEY=mysecret
|
DEBUG=True
|
||||||
|
SECRET_KEY=mysecret
|
||||||
DOMAIN=project.localhost
|
DOMAIN=project.localhost
|
||||||
DOMAIN_URL=http://project.localhost
|
DOMAIN_URL=http://project.localhost
|
||||||
ALLOWED_HOSTS=project.localhost,localhost
|
ALLOWED_HOSTS=project.localhost,localhost
|
||||||
|
STATIC_ROOT=static
|
||||||
|
STATIC_URL=/static/
|
||||||
|
MEDIA_ROOT=media
|
||||||
|
MEDIA_URL=/media/
|
||||||
|
|
||||||
# Captcha
|
# Captcha
|
||||||
HCAPTCHA_ENABLED=False
|
HCAPTCHA_ENABLED=False
|
||||||
|
Loading…
Reference in New Issue
Block a user