This action will force synchronization from Wu Clan/DBlog, which will overwrite any changes that you have made since you forked the repository, and can not be recovered!!!
Synchronous operation will process in the background and will refresh the page when finishing processing. Please be patient.
# -*- coding: utf-8 -*-from pathlib import Pathfrom django.contrib import adminBASE_DIR = Path(__file__).resolve().parent.parentSECRET_KEY = 'django-insecure-v%!69-+jqak^*4b+y5uz_udp-l^#ii6ドルw)qrm&khj2anfc25z&'DEBUG = TrueALLOWED_HOSTS = ['*']INSTALLED_APPS = ['simpleui','django.contrib.admin','django.contrib.auth','django.contrib.contenttypes','django.contrib.sessions','django.contrib.messages','django.contrib.staticfiles','blog.apps.BlogConfig','import_export','mdeditor','captcha','mptt',]MIDDLEWARE = ['django.middleware.security.SecurityMiddleware','django.contrib.sessions.middleware.SessionMiddleware','django.middleware.common.CommonMiddleware',# 'django.middleware.csrf.CsrfViewMiddleware','django.contrib.auth.middleware.AuthenticationMiddleware','django.contrib.messages.middleware.MessageMiddleware','django.middleware.clickjacking.XFrameOptionsMiddleware',# 网站gzip压缩中间件'django.middleware.gzip.GZipMiddleware',]ROOT_URLCONF = 'djangoProject.urls'TEMPLATES = [{'BACKEND': 'django.template.backends.django.DjangoTemplates','DIRS': [BASE_DIR / 'templates'] # noqa,'APP_DIRS': True,'OPTIONS': {'context_processors': ['django.template.context_processors.debug','django.template.context_processors.request','django.contrib.auth.context_processors.auth','django.contrib.messages.context_processors.messages',# 上下文处理器'blog.context_processors.sidebar','blog.context_processors.website_conf',# templates中使用 {{ MEDIA_URL }}{{ 文件名 }} 拼接文件地址'django.template.context_processors.media',],# 用于在模板中自动调用静态文件,不需要每个页面使用 {% load static %} 加载静态文件'builtins': ['django.templatetags.static',],},},]WSGI_APPLICATION = 'djangoProject.wsgi.application'DATABASES = {'default': {'ENGINE': 'django.db.backends.mysql','NAME': 'blog','USER': 'root','PASSWORD': '123456','HOST': 'dblog_mysql','PORT': '3306','OPTIONS': {'charset': 'utf8mb4'} # 字符集设置utf8mb4}}CACHES = {"default": {"BACKEND": "django_redis.cache.RedisCache","LOCATION": "redis://""@dblog_redis:6379/0","OPTIONS": {"CLIENT_CLASS": "django_redis.client.DefaultClient",}}}AUTH_PASSWORD_VALIDATORS = [{'NAME': 'django.contrib.auth.password_validation.UserAttributeSimilarityValidator',},{'NAME': 'django.contrib.auth.password_validation.MinimumLengthValidator',},{'NAME': 'django.contrib.auth.password_validation.CommonPasswordValidator',},{'NAME': 'django.contrib.auth.password_validation.NumericPasswordValidator',},]LANGUAGE_CODE = 'zh-hans'TIME_ZONE = 'Asia/Shanghai'USE_I18N = TrueUSE_L10N = TrueUSE_TZ = FalseSTATIC_URL = '/static/'STATIC_ROOT = BASE_DIR / 'static'MEDIA_URL = '/media/'MEDIA_ROOT = BASE_DIR / 'static/media'DEFAULT_AUTO_FIELD = 'django.db.models.BigAutoField'# simpleui 排序后台app导航栏SIMPLEUI_CONFIG = {'system_keep': True,'menu_display': ['文章', '文章配置', '网站配置', '公告', '文章订阅', '审核', '权限验证', ],'dynamic': True,'menus': [{'name': '文章','models': [{'name': '文章','url': '/admin/blog/article'}, {'name': '评论','url': '/admin/blog/comment'}]}, {'name': '文章配置','models': [{'name': '文章大头图','icon': 'fa fa-image','url': '/admin/blog/articleimg'}, {'name': '文章类型','icon': 'fa fa-list','url': '/admin/blog/category'}, {'name': '标签','icon': 'fa fa-tags','url': '/admin/blog/tag'}]}, {'name': '网站配置','models': [{'name': '网站基本配置','url': '/admin/blog/conf'}, {'name': '首页轮播图配置','url': '/admin/blog/carousel'}, {'name': '友链','icon': 'fa fa-link','url': '/admin/blog/friend'}, {'name': '收款图','icon': 'fa fa-coffee','url': '/admin/blog/pay'}, {'name': "关于",'icon': 'fa fa-id-card','url': '/admin/blog/about'}]}, {'name': '公告','models': [{'name': '轮播公告','icon': 'fas fa-bullhorn','url': '/admin/blog/headannouncement'}, {'name': '主公告','icon': 'fas fa-bullhorn','url': '/admin/blog/mainannouncement'}, ]}, {'name': '审核','models': [{'name': '举报','icon': 'fa fa-exclamation-triangle','url': '/admin/blog/tipoff'}]}, {'name': '文章订阅','models': [{'name': '订阅用户','icon': 'fa fa-address-book','url': '/admin/blog/subscription'}]}, {'name': '权限验证','icon': 'fas fa-user-shield','models': [{'name': '用户','icon': 'fa fa-user','url': 'auth/user/'}, ]}]}# 网站默认配置# 配置使用优先级:1.数据库(两分钟redis缓存), 2.本地main_website = 'xwboy.top'name = "CL' WU"chinese_description = '永不放弃坚持就是这么酷!要相信光'english_description = 'Never give up persistence is so cool!Believe in the light'avatar_link = 'https://oscimg.oschina.net/oscnet/up-8c492f6804d9e46184f2c0e4e02c2671.jpg!/both/200x200'website_author = 'xiaowu'website_author_link = 'http://127.0.0.1:8000'email = '2186656812@qq.com'website_number = ''git = 'https://gitee.com/wu_cl'website_logo = '/static/images/logo/DBlog.png'# simpleui本地配置# SIMPLEUI_LOGO:对官方css进行了某些修改以适应后台尺寸,使用个人logo时根据显示情况自行修改即可...SIMPLEUI_LOGO = 'http://127.0.0.1:8000/static/images/logo/DBlog.png'SIMPLEUI_HOME_TITLE = 'DBlog后台管理'SIMPLEUI_ANALYSIS = FalseSIMPLEUI_LOADING = FalseSIMPLEUI_DEFAULT_ICON = TrueSIMPLEUI_HOME_INFO = False# 后台header, titleadmin.AdminSite.site_header = SIMPLEUI_HOME_TITLEadmin.AdminSite.site_title = SIMPLEUI_HOME_TITLE# 登录后重定向到主页面LOGIN_URL = '/blog/login'# session设置SESSION_COOKIE_AGE = 86400 # Session的cookie失效日期(秒)SESSION_EXPIRE_AT_BROWSER_CLOSE = True # 是否关闭浏览器使得Session过期SESSION_SAVE_EVERY_REQUEST = False # 是否每次请求都保存Session,默认修改之后才保存# 字母验证码CAPTCHA_IMAGE_SIZE = (100, 36) # 设置 captcha 图片大小CAPTCHA_LENGTH = 4 # 字符个数CAPTCHA_TIMEOUT = 3 # 超时(minutes)# SMTP服务器# 请更改为自己的邮箱配置EMAIL_BACKEND = 'django.core.mail.backends.smtp.EmailBackend'EMAIL_HOST = 'smtp.qq.com'EMAIL_HOST_USER = 'xxx-nav@qq.com'# 密码(请替换为你自己的哟) qq为设置=>账户=>POP3/IMAP/SMTP/Exchange/CardDAV/CalDAV服务=> 开启服务POP3/SMTP服务=> 生成授权码EMAIL_HOST_PASSWORD = 'xxxvszjyenrlvfkeaef'# 发送邮件端口和加密(两种方式不能同时使用)# 云服务器使用:EMAIL_PORT = 465EMAIL_USE_SSL = True# 默认的发件人DEFAULT_FROM_EMAIL = 'xiaowu的个人博客'
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。