This commit is contained in:
王思川 2024-05-29 17:11:26 +08:00
parent 1714a0f075
commit b32c0973e8
4 changed files with 22 additions and 17 deletions

2
.gitignore vendored
View File

@ -103,3 +103,5 @@ target/
# Other files
*.csv
*.json
/.idea/misc.xml
/.gitignore

View File

@ -3,5 +3,5 @@
<component name="Black">
<option name="sdkName" value="Python 3.10 (XH_Digital_Management)" />
</component>
<component name="ProjectRootManager" version="2" project-jdk-name="Python 3.10 (XH_Digital_Management)" project-jdk-type="Python SDK" />
<component name="ProjectRootManager" version="2" project-jdk-name="Python 3.12 (XH_Digital_Management)" project-jdk-type="Python SDK" />
</project>

View File

@ -121,10 +121,10 @@ DATABASES = {
'default': {
'ENGINE': 'django.db.backends.mysql',
'NAME': 'xh_digital_manage', # 数据库名
'USER': 'root', # 用户名
'PASSWORD': '123456', # 密码
'HOST': 'localhost', # 地址
'PORT': '3306', # 端口号
'USER': 'wsc', # 用户名
'PASSWORD': 'jsxh9512..', # 密码
'HOST': 'bj-cdb-7qxczedm.sql.tencentcdb.com', # 地址
'PORT': '59450', # 端口号
'OPTIONS': {
# 这里可以添加一些额外的选项,比如连接超时时间
'connect_timeout': 20,
@ -178,15 +178,14 @@ USE_TZ = True
STATIC_URL = "static/"
STATICFILES_DIRS = [
os.path.join(BASE_DIR, 'static'),
]
# Default primary key field type
# https://docs.djangoproject.com/en/5.0/ref/settings/#default-auto-field
DEFAULT_AUTO_FIELD = "django.db.models.BigAutoField"
STATICFILES_DIRS = [
os.path.join(BASE_DIR, 'assets'),
]
LOGIN_REDIRECT_URL = '/' # 登录后重定向的URL
LOGOUT_REDIRECT_URL = '/' # 登出后重定向的URL

View File

@ -1,6 +1,6 @@
{% load static %}
<!DOCTYPE html>
<html lang="en">
{% load static %}
<head>
<title>数字化管理系统</title>
@ -414,11 +414,15 @@
class="icon feather icon-settings"></i></a>
<div class="dropdown-menu dropdown-menu-end profile-notification">
<div class="pro-head">
<img src="{% static 'images/user/avatar-2.jpg' %}" class="img-radius"
alt="User-Profile-Image">
<span>
<span class="text-muted">张三</span>
<span class="h6">zhangsan@mail.com</span>
{% if user.is_authenticated %}
<span class="text-muted">{{ user.last_name }}{{ user.first_name }}</span>
<span class="h6">{{ user.email }}</span>
{% else %}
<!-- 这里可以放置未登录时的内容 -->
<span class="text-muted">游客</span>
<span class="h6">请登录</span>
{% endif %}
</span>
</div>
<ul class="pro-body">