From c11363e94069139f89c613c678624458fe167e66 Mon Sep 17 00:00:00 2001 From: Weitian LI Date: Sun, 20 Apr 2014 23:58:30 +0800 Subject: * added 'profile', 'profile_update' and 'profile_update_done' templates and implemented related views * added 'account.forms.UpdateProfileForm' * implemented 'account.views.UpdateProfileView' using class-based view * updated 'account.urls' --- account/templates/account/profile.html | 20 +++++++++++++++--- account/templates/account/profile_update.html | 24 ++++++++++++++++++++++ account/templates/account/profile_update_done.html | 21 +++++++++++++++++++ 3 files changed, 62 insertions(+), 3 deletions(-) create mode 100644 account/templates/account/profile_update.html create mode 100644 account/templates/account/profile_update_done.html (limited to 'account/templates') diff --git a/account/templates/account/profile.html b/account/templates/account/profile.html index cb08717..e8d295c 100644 --- a/account/templates/account/profile.html +++ b/account/templates/account/profile.html @@ -20,6 +20,20 @@ 姓名 {{ profile.realname }} + + 性别 + + {% if profile.gender == 'M' %} + 男 + {% elif profile.gender == 'F' %} + 女 + {% elif profile.gender == 'X' %} + + {% else %} + 系统错误 + {% endif %} + + 邮箱 {{ user.email }} @@ -38,7 +52,7 @@ {% elif profile.is_approved == 'C' %} 审核中 {% else %} - 错误 + 系统错误 {% endif %} @@ -52,7 +66,7 @@ {% elif profile.is_sponsored == 'C' %} 审核中 {% else %} - 错误 + 系统错误 {% endif %} @@ -60,7 +74,7 @@

- 编辑个人信息 + 更新个人信息 修改密码

diff --git a/account/templates/account/profile_update.html b/account/templates/account/profile_update.html new file mode 100644 index 0000000..1802bb0 --- /dev/null +++ b/account/templates/account/profile_update.html @@ -0,0 +1,24 @@ +{% extends 'base.html' %} +{% load staticfiles %} +{% load url from future %} +{% load bootstrap3 %} + +{# login template #} + +{% block title %} +更新个人信息 | 2014 SKA Summer School +{% endblock %} + +{% block content %} +
+

更新个人信息

+
+
+ {% csrf_token %} + {% bootstrap_form form layout='horizontal' %} + {% buttons submit='提交' reset='重置' layout='horizontal' %}{% endbuttons %} +
+
+{% endblock %} + +{# vim: set ts=8 sw=2 tw=0 fenc=utf-8 ft=htmldjango.html: #} diff --git a/account/templates/account/profile_update_done.html b/account/templates/account/profile_update_done.html new file mode 100644 index 0000000..5b10eb2 --- /dev/null +++ b/account/templates/account/profile_update_done.html @@ -0,0 +1,21 @@ +{% extends 'base.html' %} +{% load staticfiles %} +{% load url from future %} +{% load bootstrap3 %} + +{# login template #} + +{% block title %} +信息已更新 | 2014 SKA Summer School +{% endblock %} + +{% block content %} +
+

信息已更新

+

您的个人信息已更新。

+
+

返回个人主页

+
+{% endblock %} + +{# vim: set ts=8 sw=2 tw=0 fenc=utf-8 ft=htmldjango.html: #} -- cgit v1.2.2