This commit is contained in:
Jane Doe
2024-09-25 12:18:07 +08:00
parent 3f369584fb
commit 9992293b9f
124 changed files with 2770 additions and 975 deletions

View File

@@ -23,7 +23,7 @@ BASE_DIR = Path(__file__).resolve().parent.parent
SECRET_KEY = "django-insecure-!4a*kl(!=s*76xngra89q*86d&e8ya=l49!bibepo6p1(50+$s"
# SECURITY WARNING: don't run with debug turned on in production!
DEBUG = False
DEBUG = True
ALLOWED_HOSTS = ['*']
# settings.py
@@ -33,13 +33,14 @@ AUTH_USER_MODEL = 'WebAdmin.User'
# Application definition
INSTALLED_APPS = [
'django.contrib.admin',
# 'django.contrib.admin',
"django.contrib.auth",
"django.contrib.contenttypes",
"django.contrib.sessions",
"django.contrib.messages",
"django.contrib.staticfiles",
'WebAdmin.apps.WebadminConfig',
'captcha',
'django.contrib.sites', # Django sites framework
'allauth', # Django allauth
'allauth.account', # Django allauth accounts
@@ -149,7 +150,7 @@ TEMPLATES = [
WSGI_APPLICATION = "WebSite.wsgi.application"
X_FRAME_OPTIONS='SAMEORIGIN'
# Database
# https://docs.djangoproject.com/en/5.0/ref/settings/#databases
@@ -159,7 +160,7 @@ DATABASES = {
{
'ENGINE': 'django.db.backends.mysql', # 数据库引擎
'NAME': 'admin_data', # 数据库名称
'HOST': '127.0.0.1', # 数据库地址,本机 ip 地址 127.0.0.1
'HOST': '47.243.173.144', # 数据库地址,本机 ip 地址 127.0.0.1
'PORT': 3306, # mysql端口
'USER': 'admin_data', # 数据库用户名
'PASSWORD': 'kyRz3c3hGMmDADrW', # 数据库密码

View File

@@ -19,7 +19,7 @@ from django.urls import path
from django.urls import path, include
from WebAdmin import views
urlpatterns = [
path('admin/', admin.site.urls),
# path('admin/', admin.site.urls),
path('', include('WebAdmin.urls')),
path('.well-known/pki-validation/1ECB936A2BFA886CCCAE51329C4219CF.txt',views.acme_challenge),
path('accounts/', include('allauth.urls')),