Merge branch 'dev' into new-arch
* dev: mail 拆分模块 修改错误提示措辞 精简重置密码邮件模板 添加重置密码以后的跳转到登录页面 如果比赛已经开始,就不再显示之前测试题目的提交 admin 添加和编辑比赛页面增加提示 修改一些细节问题 添加重置密码页面和js 修改申请重置密码页面及js名称 添加重置密码api url,调整url 修改申请找回用户登录信息的api逻辑,没有用户名也可申请 添加找回用户信息功能,修改邮件模板的一些细节 去掉申请重置密码的服务中要求填写用户名,因为有很多用户不记得用户名了 添加重置密码页面的url,并在用户登录页面添加url 添加重置密码页面的url 修改检测邮箱api使其可以被重置密码页面使用 update read 增加访问首页的参数 修改首页样式;增加背景图片 Conflicts: oj/settings.py
This commit is contained in:
@@ -55,7 +55,6 @@ INSTALLED_APPS = (
|
||||
'admin',
|
||||
'submission',
|
||||
'contest',
|
||||
'mail',
|
||||
'judge',
|
||||
'judge_dispatcher',
|
||||
|
||||
@@ -125,7 +124,6 @@ AUTH_USER_MODEL = 'account.User'
|
||||
|
||||
LOG_PATH = "log/"
|
||||
|
||||
|
||||
LOGGING = {
|
||||
'version': 1,
|
||||
'disable_existing_loggers': True,
|
||||
@@ -191,9 +189,10 @@ TEST_CASE_DIR = os.path.join(BASE_DIR, 'test_case/')
|
||||
IMAGE_UPLOAD_DIR = os.path.join(BASE_DIR, 'upload/')
|
||||
|
||||
WEBSITE_INFO = {"website_name": "qduoj",
|
||||
"website_footer": u"青岛大学信息工程学院 创新实验室",
|
||||
"website_footer": u"青岛大学信息工程学院 创新实验室 <a href=\"http://www.miibeian.gov.cn/\">京ICP备15062075号-1</a>",
|
||||
"url": "https://qduoj.com"}
|
||||
|
||||
|
||||
HUEY = {
|
||||
'backend': 'huey.backends.redis_backend',
|
||||
'name': 'task_queue',
|
||||
@@ -201,4 +200,11 @@ HUEY = {
|
||||
'always_eager': False, # Defaults to False when running via manage.py run_huey
|
||||
# Options to pass into the consumer when running ``manage.py run_huey``
|
||||
'consumer_options': {'workers': 50},
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
SMTP_CONFIG = {"smtp_server": "smtp.mxhichina.com",
|
||||
"email": "noreply@qduoj.com",
|
||||
"password": os.environ.get("smtp_password", "111111"),
|
||||
"tls": False}
|
||||
|
||||
|
||||
10
oj/urls.py
10
oj/urls.py
@@ -5,7 +5,7 @@ from django.views.generic import TemplateView
|
||||
|
||||
from account.views import (UserLoginAPIView, UsernameCheckAPIView, UserRegisterAPIView,
|
||||
UserChangePasswordAPIView, EmailCheckAPIView,
|
||||
UserAdminAPIView, UserInfoAPIView,
|
||||
UserAdminAPIView, UserInfoAPIView, ResetPasswordAPIView,
|
||||
ApplyResetPasswordAPIView, SSOAPIView, UserProfileAPIView)
|
||||
|
||||
from announcement.views import AnnouncementAdminAPIView
|
||||
@@ -122,12 +122,14 @@ urlpatterns = [
|
||||
|
||||
url(r'^user/(?P<username>.+)/$', "account.views.user_index_page"),
|
||||
|
||||
url(r'^api/reset_password/$', ApplyResetPasswordAPIView.as_view(), name="apply_reset_password_api"),
|
||||
|
||||
url(r'^api/apply_reset_password/$', ApplyResetPasswordAPIView.as_view(), name="apply_reset_password_api"),
|
||||
url(r'^api/reset_password/$', ResetPasswordAPIView.as_view(), name="apply_reset_password_api"),
|
||||
url(r'^account/settings/$', TemplateView.as_view(template_name="oj/account/settings.html"), name="account_setting_page"),
|
||||
url(r'^account/settings/avatar/$', TemplateView.as_view(template_name="oj/account/avatar.html"), name="avatar_settings_page"),
|
||||
url(r'^account/sso/$', SSOAPIView.as_view(), name="sso_api"),
|
||||
url('^api/account/userprofile/$', UserProfileAPIView.as_view(), name="userprofile_api"),
|
||||
url(r'^api/account/userprofile/$', UserProfileAPIView.as_view(), name="userprofile_api"),
|
||||
url(r'^reset_password/$', TemplateView.as_view(template_name="oj/account/apply_reset_password.html"), name="apply_reset_password_page"),
|
||||
url(r'^reset_password/t/(?P<token>\w+)/$', "account.views.reset_password_page", name="reset_password_page")
|
||||
]
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user