+
+
注意!管理员在测试比赛题目的时候请务必保持比赛状态为没有开始,这时只有管理员可以正常查看和提交题目,而且不会产生排名。
+
diff --git a/template/src/admin/contest/edit_contest.html b/template/src/admin/contest/edit_contest.html
index 2afc849..08f7c09 100644
--- a/template/src/admin/contest/edit_contest.html
+++ b/template/src/admin/contest/edit_contest.html
@@ -6,6 +6,9 @@
aria-hidden="true">← 返回
+
+
注意!管理员在测试比赛题目的时候请务必保持比赛状态为没有开始,这时只有管理员可以正常查看和提交题目,而且不会产生排名。
+
diff --git a/template/src/oj/account/apply_reset_password.html b/template/src/oj/account/apply_reset_password.html
new file mode 100644
index 0000000..5d65ccc
--- /dev/null
+++ b/template/src/oj/account/apply_reset_password.html
@@ -0,0 +1,40 @@
+{% extends "oj_base.html" %}
+{% block title %}
+ 找回登录信息
+{% endblock %}
+{% block body %}
+
+
+
找回登录信息
+
+
请输入你注册时使用的邮箱地址,系统将自动向你的邮箱发送一封含有您登录信息的电子邮件,
+ 你可以看到你的用户名,并可以选择重新设置登录密码,注意为了你的账户安全,重置密码链接仅在30分钟内有效
+
+
+
+
+
+{% endblock %}
+{% block js_block %}
+
+{% endblock %}
\ No newline at end of file
diff --git a/template/src/oj/account/change_password.html b/template/src/oj/account/change_password.html
index 3f346e2..9fd1334 100644
--- a/template/src/oj/account/change_password.html
+++ b/template/src/oj/account/change_password.html
@@ -36,7 +36,7 @@
diff --git a/template/src/oj/account/login.html b/template/src/oj/account/login.html
index adc5ca9..eadb5cc 100644
--- a/template/src/oj/account/login.html
+++ b/template/src/oj/account/login.html
@@ -32,6 +32,7 @@
+
忘记用户名/密码
还没有帐号?点击注册
diff --git a/template/src/oj/account/reset_password.html b/template/src/oj/account/reset_password.html
index 71ce692..703ff6f 100644
--- a/template/src/oj/account/reset_password.html
+++ b/template/src/oj/account/reset_password.html
@@ -1,10 +1,53 @@
-
-
-
-
-
-
-
+{% extends "oj_base.html" %}
+{% block title %}
+ 找回登录信息
+{% endblock %}
+{% block body %}
+
+
+
找回登录信息
+
-
-
\ No newline at end of file
+
+
+
+{% endblock %}
+{% block js_block %}
+
+{% endblock %}
\ No newline at end of file
diff --git a/template/src/oj/index.html b/template/src/oj/index.html
index 4a8edd3..0245084 100644
--- a/template/src/oj/index.html
+++ b/template/src/oj/index.html
@@ -100,6 +100,15 @@
max-width: 300px;
}
+ .section{
+ background-size: cover;
+ }
+
+ #section0{
+ background-image: url(/static/img/index/bg/bg3.jpg);
+ padding: 0 0 0 0;
+ }
+
@@ -110,12 +119,21 @@
@@ -172,7 +190,7 @@

-
自由举办小组赛(10月上线)
+
自由举办小组赛(12月上线)
内部比赛,日常作业,期末考试,通通搞定
diff --git a/template/src/utils/reset_password_email.html b/template/src/utils/reset_password_email.html
index f4c8b93..5a0b591 100644
--- a/template/src/utils/reset_password_email.html
+++ b/template/src/utils/reset_password_email.html
@@ -8,7 +8,7 @@
|
- {{ website_name }} 密码找回邮件
+ {{ website_name }} 登录信息找回
|
@@ -32,12 +32,12 @@
|
- 您刚刚在 {{ website_name }} 使用了找回密码功能。
+ 您刚刚在 {{ website_name }} 申请了找回登录信息服务。
|
|
- 请在60分钟内点击下面链接设置您的新密码:
+ 请在30分钟内点击下面链接设置您的新密码:
|
@@ -63,7 +63,8 @@
|
- 如果你没有提出过密码修改申请,请忽略此邮件。有可能是其他用户误填了你的用户名。我们不会对你的帐户进行任何修改。
+ 如果您没有提出过该申请,请忽略此邮件。有可能是其他用户误填了您的邮件地址,我们不会对你的帐户进行任何修改。
+ 请不要向他人透露本邮件的内容,否则可能会导致您的账号被盗。
|
diff --git a/utils/mail.py b/utils/mail.py
new file mode 100644
index 0000000..5d4e1c3
--- /dev/null
+++ b/utils/mail.py
@@ -0,0 +1,15 @@
+# coding=utf-8
+from envelopes import Envelope
+
+from django.conf import settings
+
+
+def send_email(from_name, to_email, to_name, subject, content):
+ envelope = Envelope(from_addr=(settings.SMTP_CONFIG["email"], from_name),
+ to_addr=(to_email, to_name),
+ subject=subject,
+ html_body=content)
+ envelope.send(settings.SMTP_CONFIG["smtp_server"],
+ login=settings.SMTP_CONFIG["email"],
+ password=settings.SMTP_CONFIG["password"],
+ tls=settings.SMTP_CONFIG["tls"])