aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWeitian LI <liweitianux@gmail.com>2014-04-20 16:17:47 +0800
committerWeitian LI <liweitianux@gmail.com>2014-04-20 16:17:47 +0800
commitd477d14d624bea299a62199799607155d43a4226 (patch)
treec82c424f77993b7138f01249c99cd3309612d012
parent0005d0926d15d9034d8cb47da3861e5ab6dd02f1 (diff)
downloaddjango-skaschool-d477d14d624bea299a62199799607155d43a4226.tar.bz2
* implemented the index page
o base.html, navbar.html, favicon.html, index.html o added static files related to index page * performed south migrations * implemented registration templates * implemented regiration views and pages
-rw-r--r--account/migrations/0001_initial.py74
-rw-r--r--account/migrations/0002_auto__add_field_userprofile_is_approved__add_field_userprofile_is_spon.py79
-rw-r--r--account/migrations/__init__.py0
-rw-r--r--notice/migrations/0001_initial.py20
-rw-r--r--notice/migrations/__init__.py0
-rw-r--r--page/README.txt5
-rw-r--r--page/migrations/0001_initial.py20
-rw-r--r--page/migrations/__init__.py0
-rw-r--r--page/urls.py6
-rw-r--r--page/views.py14
-rw-r--r--static/css/base.css16
-rw-r--r--static/css/index.css101
-rw-r--r--static/images/apple-touch-icon-144-precomposed.pngbin0 -> 14210 bytes
-rw-r--r--static/images/favicon.pngbin0 -> 1976 bytes
-rw-r--r--static/images/skaschool-bg.jpgbin0 -> 485639 bytes
-rw-r--r--static/images/skaschool-bg2.jpgbin0 -> 508774 bytes
-rw-r--r--static/js/index.js17
-rw-r--r--templates/activation_complete.html22
-rw-r--r--templates/base.html85
-rw-r--r--templates/bootstrap.html3
-rw-r--r--templates/favicon.html5
-rw-r--r--templates/form.html17
-rw-r--r--templates/form_horizontal.html17
-rw-r--r--templates/form_inline.html17
-rw-r--r--templates/form_with_files.html17
-rw-r--r--templates/home.html7
-rw-r--r--templates/index.html50
-rw-r--r--templates/navbar.html51
-rw-r--r--templates/pagination.html25
-rw-r--r--templates/registration/activate.html24
-rw-r--r--templates/registration/activation_complete.html22
-rw-r--r--templates/registration/activation_email.txt10
-rw-r--r--templates/registration/activation_email_subject.txt2
-rw-r--r--templates/registration/registration_closed.html11
-rw-r--r--templates/registration/registration_complete.html27
-rw-r--r--templates/registration/registration_form.html22
36 files changed, 658 insertions, 128 deletions
diff --git a/account/migrations/0001_initial.py b/account/migrations/0001_initial.py
new file mode 100644
index 0000000..be009e2
--- /dev/null
+++ b/account/migrations/0001_initial.py
@@ -0,0 +1,74 @@
+# -*- coding: utf-8 -*-
+from south.utils import datetime_utils as datetime
+from south.db import db
+from south.v2 import SchemaMigration
+from django.db import models
+
+
+class Migration(SchemaMigration):
+
+ def forwards(self, orm):
+ # Adding model 'UserProfile'
+ db.create_table(u'account_userprofile', (
+ (u'id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
+ ('user', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['auth.User'], unique=True)),
+ ('realname', self.gf('django.db.models.fields.CharField')(max_length=30)),
+ ('gender', self.gf('django.db.models.fields.CharField')(max_length=1)),
+ ('institute', self.gf('django.db.models.fields.CharField')(max_length=100)),
+ ))
+ db.send_create_signal(u'account', ['UserProfile'])
+
+
+ def backwards(self, orm):
+ # Deleting model 'UserProfile'
+ db.delete_table(u'account_userprofile')
+
+
+ models = {
+ u'account.userprofile': {
+ 'Meta': {'object_name': 'UserProfile'},
+ 'gender': ('django.db.models.fields.CharField', [], {'max_length': '1'}),
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'institute': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
+ 'realname': ('django.db.models.fields.CharField', [], {'max_length': '30'}),
+ 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['auth.User']", 'unique': 'True'})
+ },
+ u'auth.group': {
+ 'Meta': {'object_name': 'Group'},
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}),
+ 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': u"orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'})
+ },
+ u'auth.permission': {
+ 'Meta': {'ordering': "(u'content_type__app_label', u'content_type__model', u'codename')", 'unique_together': "((u'content_type', u'codename'),)", 'object_name': 'Permission'},
+ 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
+ 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['contenttypes.ContentType']"}),
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'})
+ },
+ u'auth.user': {
+ 'Meta': {'object_name': 'User'},
+ 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
+ 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}),
+ 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}),
+ 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'related_name': "u'user_set'", 'blank': 'True', 'to': u"orm['auth.Group']"}),
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
+ 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
+ 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
+ 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
+ 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}),
+ 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}),
+ 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'related_name': "u'user_set'", 'blank': 'True', 'to': u"orm['auth.Permission']"}),
+ 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'})
+ },
+ u'contenttypes.contenttype': {
+ 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"},
+ 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
+ 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'})
+ }
+ }
+
+ complete_apps = ['account'] \ No newline at end of file
diff --git a/account/migrations/0002_auto__add_field_userprofile_is_approved__add_field_userprofile_is_spon.py b/account/migrations/0002_auto__add_field_userprofile_is_approved__add_field_userprofile_is_spon.py
new file mode 100644
index 0000000..4c3837a
--- /dev/null
+++ b/account/migrations/0002_auto__add_field_userprofile_is_approved__add_field_userprofile_is_spon.py
@@ -0,0 +1,79 @@
+# -*- coding: utf-8 -*-
+from south.utils import datetime_utils as datetime
+from south.db import db
+from south.v2 import SchemaMigration
+from django.db import models
+
+
+class Migration(SchemaMigration):
+
+ def forwards(self, orm):
+ # Adding field 'UserProfile.is_approved'
+ db.add_column(u'account_userprofile', 'is_approved',
+ self.gf('django.db.models.fields.BooleanField')(default=False),
+ keep_default=False)
+
+ # Adding field 'UserProfile.is_sponsored'
+ db.add_column(u'account_userprofile', 'is_sponsored',
+ self.gf('django.db.models.fields.BooleanField')(default=False),
+ keep_default=False)
+
+
+ def backwards(self, orm):
+ # Deleting field 'UserProfile.is_approved'
+ db.delete_column(u'account_userprofile', 'is_approved')
+
+ # Deleting field 'UserProfile.is_sponsored'
+ db.delete_column(u'account_userprofile', 'is_sponsored')
+
+
+ models = {
+ u'account.userprofile': {
+ 'Meta': {'object_name': 'UserProfile'},
+ 'gender': ('django.db.models.fields.CharField', [], {'max_length': '1'}),
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'institute': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
+ 'is_approved': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
+ 'is_sponsored': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
+ 'realname': ('django.db.models.fields.CharField', [], {'max_length': '30'}),
+ 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['auth.User']", 'unique': 'True'})
+ },
+ u'auth.group': {
+ 'Meta': {'object_name': 'Group'},
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}),
+ 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': u"orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'})
+ },
+ u'auth.permission': {
+ 'Meta': {'ordering': "(u'content_type__app_label', u'content_type__model', u'codename')", 'unique_together': "((u'content_type', u'codename'),)", 'object_name': 'Permission'},
+ 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
+ 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['contenttypes.ContentType']"}),
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'})
+ },
+ u'auth.user': {
+ 'Meta': {'object_name': 'User'},
+ 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
+ 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}),
+ 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}),
+ 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'related_name': "u'user_set'", 'blank': 'True', 'to': u"orm['auth.Group']"}),
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
+ 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
+ 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
+ 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
+ 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}),
+ 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}),
+ 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'related_name': "u'user_set'", 'blank': 'True', 'to': u"orm['auth.Permission']"}),
+ 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'})
+ },
+ u'contenttypes.contenttype': {
+ 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"},
+ 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
+ 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'})
+ }
+ }
+
+ complete_apps = ['account'] \ No newline at end of file
diff --git a/account/migrations/__init__.py b/account/migrations/__init__.py
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/account/migrations/__init__.py
diff --git a/notice/migrations/0001_initial.py b/notice/migrations/0001_initial.py
new file mode 100644
index 0000000..4243e11
--- /dev/null
+++ b/notice/migrations/0001_initial.py
@@ -0,0 +1,20 @@
+# -*- coding: utf-8 -*-
+from south.utils import datetime_utils as datetime
+from south.db import db
+from south.v2 import SchemaMigration
+from django.db import models
+
+
+class Migration(SchemaMigration):
+
+ def forwards(self, orm):
+ pass
+
+ def backwards(self, orm):
+ pass
+
+ models = {
+
+ }
+
+ complete_apps = ['notice'] \ No newline at end of file
diff --git a/notice/migrations/__init__.py b/notice/migrations/__init__.py
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/notice/migrations/__init__.py
diff --git a/page/README.txt b/page/README.txt
new file mode 100644
index 0000000..37360b3
--- /dev/null
+++ b/page/README.txt
@@ -0,0 +1,5 @@
+App page
+
+Places skaschool pages.
+There is also an app 'notice' to deal with notice and related pages.
+
diff --git a/page/migrations/0001_initial.py b/page/migrations/0001_initial.py
new file mode 100644
index 0000000..a00578a
--- /dev/null
+++ b/page/migrations/0001_initial.py
@@ -0,0 +1,20 @@
+# -*- coding: utf-8 -*-
+from south.utils import datetime_utils as datetime
+from south.db import db
+from south.v2 import SchemaMigration
+from django.db import models
+
+
+class Migration(SchemaMigration):
+
+ def forwards(self, orm):
+ pass
+
+ def backwards(self, orm):
+ pass
+
+ models = {
+
+ }
+
+ complete_apps = ['page'] \ No newline at end of file
diff --git a/page/migrations/__init__.py b/page/migrations/__init__.py
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/page/migrations/__init__.py
diff --git a/page/urls.py b/page/urls.py
index daef1aa..8c195e9 100644
--- a/page/urls.py
+++ b/page/urls.py
@@ -4,10 +4,14 @@
#
from django.conf.urls import patterns, include, url
-from django.views.generic.base import TemplateView
+from django.views.generic.base import TemplateView, RedirectView
+from django.core.urlresolvers import reverse_lazy
urlpatterns = patterns('',
+ # test page
url(r'^test/$', TemplateView.as_view(template_name='test.html'),
name='test'),
+ # index page
+ url(r'^$', RedirectView.as_view(url=reverse_lazy('index'))),
)
diff --git a/page/views.py b/page/views.py
index 91ea44a..15b7575 100644
--- a/page/views.py
+++ b/page/views.py
@@ -1,3 +1,15 @@
+# -*- coding: utf-8 -*-
+
+"""
+App 'page' views
+"""
+
from django.shortcuts import render
+from django.views.generic.base import TemplateView
+
+
+###### class-based views ######
+## IndexView: used in 'django_skaschool/urls' as index
+
+
-# Create your views here.
diff --git a/static/css/base.css b/static/css/base.css
new file mode 100644
index 0000000..dd08deb
--- /dev/null
+++ b/static/css/base.css
@@ -0,0 +1,16 @@
+/*
+ * skaschool website custom css
+ * base.css (linked in 'base.html')
+ *
+ * Weitian LI
+ */
+
+body {
+ position: relative; /* For scrollyspy */
+ padding-top: 52px; /* Account for fixed navbar */
+}
+
+.navbar-btn {
+ margin-left: 8px;
+}
+
diff --git a/static/css/index.css b/static/css/index.css
new file mode 100644
index 0000000..344ff07
--- /dev/null
+++ b/static/css/index.css
@@ -0,0 +1,101 @@
+/*
+ * skaschool website custom css
+ * index.css
+ *
+ * Weitian LI
+ */
+
+.skaschool-home {
+ background: url(../images/skaschool-bg.jpg) no-repeat center center fixed;
+ -webkit-background-size: cover;
+ -moz-background-size: cover;
+ -o-background-size: cover;
+ background-size: cover;
+ filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='../images/skaschool-bg.jpg', sizingMethod='scale');
+ -ms-filter: "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='../images/skaschool-bg.jpg', sizingMethod='scale')";
+}
+
+.masthead {
+ color: #CCCCCC;
+ padding: 30px 15px;
+ position: relative;
+ text-align: center;
+ text-shadow: 0 1px 0 rgba(0, 0, 0, 0.15);
+}
+.masthead h1 {
+ color: #EEEEEE;
+}
+.masthead .btn-outline-inverse {
+ margin: 10px;
+}
+.masthead-links {
+ list-style: none outside none;
+ margin-top: 10px;
+ margin-bottom: 20px;
+ padding: 0 15px;
+ text-align: center;
+}
+.masthead-links li {
+ display: inline;
+}
+.masthead-links li + li {
+ margin-left: 10px;
+}
+.masthead-links a {
+ color: #EEEEEE;
+}
+@media (min-width: 768px) {
+ .masthead {
+ padding-top: 80px;
+ padding-bottom: 140px;
+ text-align: left;
+ }
+ .masthead .lead {
+ font-size: 20px;
+ margin-right: 25%;
+ }
+ .masthead .btn-outline-inverse {
+ font-size: 18px;
+ margin: 18px 5px 18px 0;
+ padding: 16px 20px;
+ width: auto;
+ }
+ .masthead-links {
+ padding: 0;
+ text-align: left;
+ }
+}
+
+/* Outline button for use within the docs */
+.btn-outline {
+ color: #563d7c;
+ background-color: #FFFFFF;
+ border-color: #e5e5e5;
+}
+.btn-outline:hover,
+.btn-outline:focus,
+.btn-outline:active {
+ color: #fff;
+ background-color: #563d7c;
+ border-color: #563d7c;
+}
+
+/* Inverted outline button (white on dark) */
+.btn-outline-inverse {
+ color: #E5E5E5;
+ background-color: transparent;
+ border-color: #E5E5E5;
+}
+.btn-outline-inverse:hover,
+.btn-outline-inverse:focus,
+.btn-outline-inverse:active {
+ color: #252525;
+ text-shadow: none;
+ background-color: #E5E5E5;
+ border-color: #E5E5E5;
+}
+
+footer {
+ color: #CCCCCC;
+}
+
diff --git a/static/images/apple-touch-icon-144-precomposed.png b/static/images/apple-touch-icon-144-precomposed.png
new file mode 100644
index 0000000..1486856
--- /dev/null
+++ b/static/images/apple-touch-icon-144-precomposed.png
Binary files differ
diff --git a/static/images/favicon.png b/static/images/favicon.png
new file mode 100644
index 0000000..928ba9b
--- /dev/null
+++ b/static/images/favicon.png
Binary files differ
diff --git a/static/images/skaschool-bg.jpg b/static/images/skaschool-bg.jpg
new file mode 100644
index 0000000..fc27544
--- /dev/null
+++ b/static/images/skaschool-bg.jpg
Binary files differ
diff --git a/static/images/skaschool-bg2.jpg b/static/images/skaschool-bg2.jpg
new file mode 100644
index 0000000..1c2fdb3
--- /dev/null
+++ b/static/images/skaschool-bg2.jpg
Binary files differ
diff --git a/static/js/index.js b/static/js/index.js
new file mode 100644
index 0000000..1f955a2
--- /dev/null
+++ b/static/js/index.js
@@ -0,0 +1,17 @@
+/*
+ * js code for 'index.html' page
+ *
+ * Weitian LI
+ */
+
+$(document).ready(function() {
+ // add class "skaschool-home" to "body"
+ if (! $("body").hasClass("skaschool-home")) {
+ $("body").addClass("skaschool-home");
+ }
+ // add class "masthead" to "main"
+ if (! $("main").hasClass("masthead")) {
+ $("main").addClass("masthead");
+ }
+});
+
diff --git a/templates/activation_complete.html b/templates/activation_complete.html
new file mode 100644
index 0000000..11ca25e
--- /dev/null
+++ b/templates/activation_complete.html
@@ -0,0 +1,22 @@
+{% extends 'base.html' %}
+{% load staticfiles %}
+{% load url from future %}
+{% load bootstrap3 %}
+
+{# step 4. activation complete #}
+
+{% block title %}
+成功激活 | 2014 SKA Summer School
+{% endblock %}
+
+{% block content %}
+ <div class="container">
+ <h2>成功激活</h2>
+ <p class="lead">您已成功激活账户。</p>
+
+ <br />
+ <p><a href="#" class="btn btn-primary">登录</a></p>
+ </div>
+{% endblock %}
+
+{# vim: set ts=8 sw=2 tw=0 fenc=utf-8 ft=htmldjango.html: #}
diff --git a/templates/base.html b/templates/base.html
index df9c111..81766a4 100644
--- a/templates/base.html
+++ b/templates/base.html
@@ -1,25 +1,76 @@
-{% extends 'bootstrap.html' %}
+{% extends 'bootstrap3/bootstrap3.html' %}
-{% load url from future %}
+{% comment %}
+'base.html' for skaschool
+based on 'django-bootstrap3'
+
+Weitian LI <liweitianux@gmail.com>
+2014/04/19
+{% endcomment %}
{% load bootstrap3 %}
+{% load url from future %}
+{% load staticfiles %}
-{% block bootstrap3_content %}
- <div class="container">
- <h1>{% block title %}(no title){% endblock %}</h1>
+{# title #}
+{% block bootstrap3_title %}
+ {% block title %}(title){% endblock %}
+{% endblock %}
- <p>
- <a href="{% url 'home' %}">home</a>
- <a href="{% url 'form_default' %}">form</a>
- <a href="{% url 'form_horizontal' %}">form_horizontal</a>
- <a href="{% url 'form_inline' %}">form_inline</a>
- <a href="{% url 'form_with_files' %}">form_with_files</a>
- <a href="{% url 'pagination' %}">pagination</a>
- </p>
+{# bootstrap3_extra_head #}
+{% block bootstrap3_extra_head %}
+ {# custom css #}
+ {% block custom_css %}
+ <link href="{% static 'css/base.css' %}" rel="stylesheet">
+ {# css_extra #}
+ {% block css_extra %}{% endblock %}
+ {% endblock %} {# custom_css #}
+ {# add favicon #}
+ {% block favicon %}
+ {% include 'favicon.html' %}
+ {% endblock %}
+{% endblock %}
- {% bootstrap_messages %}
+{# body #}
+{% block bootstrap3_content %}
+ {# add block page #}
+ {% block page %}
+ {# message #}
+ {% block message %}
+ {# show 'django.contrib.messages' in Bootstrap alert containers #}
+ {% bootstrap_messages %}
+ {% endblock %} {# message #}
+ {# header #}
+ {% block header %}
+ <header role="banner">
+ {# navigation bar #}
+ {% block navbar %}
+ {% include 'navbar.html' %}
+ {% endblock %} {# navbar #}
+ {# header_extra #}
+ {% block header_extra %}{% endblock %}
+ </header>
+ {% endblock %} {# header #}
+ {# main #}
+ {% block main %}
+ <main role="main">
+ {# sidebar #}
+ {% block sidebar %}{% endblock %}
+ {# content #}
+ {% block content %}{% endblock %}
+ </main>
+ {% endblock %} {# main #}
+ {# footer #}
+ {% block footer %}{% endblock %}
+ {% endblock page %} {# page #}
+{% endblock %} {# bootstrap3_content #}
- {% block content %}(no content){% endblock %}
- </div>
+{# bootstrap3_extra_scripts #}
+{% block bootstrap3_extra_script %}
+ {# extra javascript files #}
+ {% block js_extra %}{% endblock %}
+ {# custom script (e.g. built-in js code) #}
+ {% block custom_script %}{% endblock %}
+{% endblock %} {# bootstrap3_extra_script #}
-{% endblock %}
+{# vim: set ts=8 sw=2 tw=0 fenc=utf-8 ft=htmldjango.html: #}
diff --git a/templates/bootstrap.html b/templates/bootstrap.html
deleted file mode 100644
index 5e5b581..0000000
--- a/templates/bootstrap.html
+++ /dev/null
@@ -1,3 +0,0 @@
-{% extends 'bootstrap3/bootstrap3.html' %}
-
-{% block bootstrap3_title %}{% block title %}{% endblock %}{% endblock %}
diff --git a/templates/favicon.html b/templates/favicon.html
new file mode 100644
index 0000000..e6a0255
--- /dev/null
+++ b/templates/favicon.html
@@ -0,0 +1,5 @@
+{# Favicons: to be included in 'base.html' #}
+{% load staticfiles %}
+<link rel="apple-touch-icon-precomposed" sizes="144x144" href="{% static 'images/apple-touch-icon-144-precomposed.png' %}">
+<link rel="shortcut icon" href="{% static 'images/favicon.png' %}">
+{# vim: set ts=8 sw=2 tw=0 fenc=utf-8 ft=htmldjango.html: #}
diff --git a/templates/form.html b/templates/form.html
deleted file mode 100644
index dca0f83..0000000
--- a/templates/form.html
+++ /dev/null
@@ -1,17 +0,0 @@
-{% extends 'base.html' %}
-
-{% load bootstrap3 %}
-
-{% block title %}
- Forms
-{% endblock %}
-
-{% block content %}
-
- <form role="form" method="post">
- {% csrf_token %}
- {% bootstrap_form form %}
- {% buttons submit='OK' reset="Cancel" %}{% endbuttons %}
- </form>
-
-{% endblock %}
diff --git a/templates/form_horizontal.html b/templates/form_horizontal.html
deleted file mode 100644
index d9fc0c3..0000000
--- a/templates/form_horizontal.html
+++ /dev/null
@@ -1,17 +0,0 @@
-{% extends 'base.html' %}
-
-{% load bootstrap3 %}
-
-{% block title %}
- Forms
-{% endblock %}
-
-{% block content %}
-
- <form role="form" class="form-horizontal" method="post">
- {% csrf_token %}
- {% bootstrap_form form layout="horizontal" %}
- {% buttons submit='OK' reset='Cancel' layout='horizontal' %}{% endbuttons %}
- </form>
-
-{% endblock %}
diff --git a/templates/form_inline.html b/templates/form_inline.html
deleted file mode 100644
index 493bd18..0000000
--- a/templates/form_inline.html
+++ /dev/null
@@ -1,17 +0,0 @@
-{% extends 'base.html' %}
-
-{% load bootstrap3 %}
-
-{% block title %}
- Forms
-{% endblock %}
-
-{% block content %}
-
- <form role="form" class="form-inline" method="post">
- {% csrf_token %}
- {% bootstrap_form form layout='inline' %}
- {% buttons submit='OK' reset='Cancel' layout='inline' %}{% endbuttons %}
- </form>
-
-{% endblock %}
diff --git a/templates/form_with_files.html b/templates/form_with_files.html
deleted file mode 100644
index 3e5e83f..0000000
--- a/templates/form_with_files.html
+++ /dev/null
@@ -1,17 +0,0 @@
-{% extends 'demo/base.html' %}
-
-{% load bootstrap3 %}
-
-{% block title %}
- Forms
-{% endblock %}
-
-{% block content %}
-
- <form role="form" method="post" enctype="multipart/form-data" {% if layout != 'vertical' %}class="form-{{ layout }}"{% endif %}>
- {% csrf_token %}
- {% bootstrap_form form layout=layout %}
- {% buttons submit='OK' reset="Cancel" %}{% endbuttons %}
- </form>
-
-{% endblock %}
diff --git a/templates/home.html b/templates/home.html
deleted file mode 100644
index 64d4501..0000000
--- a/templates/home.html
+++ /dev/null
@@ -1,7 +0,0 @@
-{% extends 'base.html' %}
-
-{% block title %}django-bootstrap3{% endblock %}
-
-{% block content %}
- This is <em>bootstrap3</em> for <strong>Django</strong>.
-{% endblock %}
diff --git a/templates/index.html b/templates/index.html
new file mode 100644
index 0000000..1904f8c
--- /dev/null
+++ b/templates/index.html
@@ -0,0 +1,50 @@
+{% extends 'base.html' %}
+{% load staticfiles %}
+{% load url from future %}
+
+{# index page for skaschool #}
+
+{% block title %}
+首页 | 2014 SKA Summer School
+{% endblock %}
+
+{% block css_extra %}
+ <link href="{% static 'css/index.css' %}" rel="stylesheet">
+{% endblock %}
+
+{% block content %}
+ <div class="container">
+ <h1>第二届 中国SKA暑期学校</h1>
+ <h1>暨 中国-新西兰联合SKA暑期学校</h1>
+ <h2>China-New Zealand Joint SKA Summer School</h2>
+
+ <br />
+ <p class="lead">
+ 上海,2014,6月28日-7月5日 <br />
+ June 28 - July 05, 2014, Shanghai
+ </p>
+
+ <br />
+ <p>
+ <a href="#" class="btn btn-outline-inverse btn-lg">了解更多</a>
+ <a href="{% url 'registration_register' %}" class="btn btn-outline-inverse btn-lg">注册参加</a>
+ </p>
+ </div>
+{% endblock %} {# content #}
+
+{% block footer %}
+ <footer class="container" role="contentinfo">
+ <p>Brought to you by: <strong>Weitian LI</strong>.</p>
+ <ul class="masthead-links">
+ <li>Powered by:</li>
+ <li><a href="https://www.djangoproject.com/">Django</a></li>
+ <li><a href="http://getbootstrap.com/">Bootstrap</a></li>
+ </ul>
+ </footer>
+{% endblock %}
+
+{% block js_extra %}
+ <script src="{% static 'js/index.js' %}" type="text/javascript"></script>
+{% endblock %}
+
+{# vim: set ts=8 sw=2 tw=0 fenc=utf-8 ft=htmldjango.html: #}
diff --git a/templates/navbar.html b/templates/navbar.html
new file mode 100644
index 0000000..00d285f
--- /dev/null
+++ b/templates/navbar.html
@@ -0,0 +1,51 @@
+{# navbar: to be included in 'base.html' #}
+{% load url from future %}
+{% load staticfiles %}
+<nav class="navbar navbar-inverse navbar-fixed-top" role="navigation">
+ <div class="container">
+ <!-- Brand and toggle get grouped for better mobile display -->
+ <div class="navbar-header">
+ <button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#ska-navbar-collapse">
+ <span class="sr-only">Toggle navigation</span>
+ <span class="icon-bar"></span>
+ <span class="icon-bar"></span>
+ <span class="icon-bar"></span>
+ </button>
+ <a class="navbar-brand" href="{% url 'index' %}">SKA暑期学校</a>
+ </div> <!-- navbar-header -->
+ <!-- Collect the nav links, forms, and other content for toggling -->
+ <div class="collapse navbar-collapse" id="ska-navbar-collapse">
+ <ul class="nav navbar-nav">
+ <li><a href="#">介绍</a></li>
+ <li><a href="#">通知</a></li>
+ <li><a href="#">日程</a></li>
+ <li><a href="#">组委会</a></li>
+ <li><a href="#">交通/食宿</a></li>
+ <li class="dropdown">
+ <a href="#" class="dropdown-toggle" data-toggle="dropdown">更多 <b class="caret"></b></a>
+ <ul class="dropdown-menu">
+ <li><a href="#">下载</a></li>
+ <li><a href="#">赞助方</a></li>
+ <li><a href="#">联系方式</a></li>
+ <li class="divider"></li>
+ <li><a href="#">关于</a></li>
+ </ul>
+ </li>
+ </ul>
+ <ul class="nav navbar-nav navbar-right">
+ <li><a href="#">English</a></li>
+ {% if user.is_authenticated %}
+ <li>
+ <a href="#" class="navbar-link">{{ user.username }}</a> |
+ <a href="#" class="navbar-link">退出</a>
+ </li>
+ {% else %}
+ <!-- wrap 'navbar-btn' within 'div' -->
+ <li><div><a href="{% url 'registration_register' %}" class="btn btn-default navbar-btn">注册</a></div></li>
+ <li><div><a href="#" class="btn btn-primary navbar-btn">登录</a></div></li>
+ {% endif %}
+ </ul>
+ </div> <!-- /.navbar-collapse -->
+ </div> <!-- /.container-->
+</nav>
+{# vim: set ts=8 sw=2 tw=0 fenc=utf-8 ft=htmldjango.html: #}
diff --git a/templates/pagination.html b/templates/pagination.html
deleted file mode 100644
index ed11d4f..0000000
--- a/templates/pagination.html
+++ /dev/null
@@ -1,25 +0,0 @@
-{% extends 'base.html' %}
-
-{% load bootstrap3 %}
-
-{% block title %}
- Pagination
-{% endblock %}
-
-{% block content %}
-
- <table class="table">
- {% for line in lines %}
- <tr>
- <td>{{ line }}</td>
- </tr>
- {% endfor %}
- </table>
-
- <hr>
-
- {% bootstrap_pagination lines url="/pagination?page=1&flop=flip" extra="q=foo" size="small" %}
-
- {% bootstrap_pagination lines url="/pagination?page=1" size="large" %}
-
-{% endblock %}
diff --git a/templates/registration/activate.html b/templates/registration/activate.html
new file mode 100644
index 0000000..113d1b3
--- /dev/null
+++ b/templates/registration/activate.html
@@ -0,0 +1,24 @@
+{% extends 'base.html' %}
+{% load staticfiles %}
+{% load url from future %}
+{% load bootstrap3 %}
+
+{# step 3. activating ... #}
+{% comment %}
+Note: This page is showed when activation failed.
+ Otherwise, it will be redirect to 'registration_activation_complete'
+{% endcomment %}
+
+{% block title %}
+激活失败 | 2014 SKA Summer School
+{% endblock %}
+
+{% block content %}
+ <div class="container">
+ <h2>激活失败</h2>
+ <p class="lead">Oops, 激活您的账户时遇到一点小问题,请检查激活链接是否正确并且没有过期……</p>
+ <p>如果您还是不能激活账户,请直接与我们联系:<a href="mailto:skaschool2014@163.com"><code>skaschool2014@163.com</code></a></p>
+ </div>
+{% endblock %}
+
+{# vim: set ts=8 sw=2 tw=0 fenc=utf-8 ft=htmldjango.html: #}
diff --git a/templates/registration/activation_complete.html b/templates/registration/activation_complete.html
new file mode 100644
index 0000000..11ca25e
--- /dev/null
+++ b/templates/registration/activation_complete.html
@@ -0,0 +1,22 @@
+{% extends 'base.html' %}
+{% load staticfiles %}
+{% load url from future %}
+{% load bootstrap3 %}
+
+{# step 4. activation complete #}
+
+{% block title %}
+成功激活 | 2014 SKA Summer School
+{% endblock %}
+
+{% block content %}
+ <div class="container">
+ <h2>成功激活</h2>
+ <p class="lead">您已成功激活账户。</p>
+
+ <br />
+ <p><a href="#" class="btn btn-primary">登录</a></p>
+ </div>
+{% endblock %}
+
+{# vim: set ts=8 sw=2 tw=0 fenc=utf-8 ft=htmldjango.html: #}
diff --git a/templates/registration/activation_email.txt b/templates/registration/activation_email.txt
index 48bee50..0667fa0 100644
--- a/templates/registration/activation_email.txt
+++ b/templates/registration/activation_email.txt
@@ -1,11 +1,11 @@
-Dear {% username %},
+Hello,
Please follow the link below to activate your account at
-"2014 SKA Summer School".
+"2014 SKA Summer School"({{ site }}).
-{% activation_key %}
-{% expiration_days %}
-{% site %}
+http://{{ site }}/accounts/activate/{{ activation_key }}
+
+Note: this link will expire in {{ expiration_days }} days.
Best regards.
diff --git a/templates/registration/activation_email_subject.txt b/templates/registration/activation_email_subject.txt
index d5fe380..215f006 100644
--- a/templates/registration/activation_email_subject.txt
+++ b/templates/registration/activation_email_subject.txt
@@ -1 +1 @@
-激活您的账号
+激活您的账户
diff --git a/templates/registration/registration_closed.html b/templates/registration/registration_closed.html
new file mode 100644
index 0000000..3501f3e
--- /dev/null
+++ b/templates/registration/registration_closed.html
@@ -0,0 +1,11 @@
+{% extends 'base.html' %}
+{% load staticfiles %}
+{% load url from future %}
+
+{# registration closed #}
+
+{% block title %}
+已关闭注册 | 2014 SKA Summer School
+{% endblock %}
+
+{# vim: set ts=8 sw=2 tw=0 fenc=utf-8 ft=htmldjango.html: #}
diff --git a/templates/registration/registration_complete.html b/templates/registration/registration_complete.html
new file mode 100644
index 0000000..21cb13d
--- /dev/null
+++ b/templates/registration/registration_complete.html
@@ -0,0 +1,27 @@
+{% extends 'base.html' %}
+{% load staticfiles %}
+{% load url from future %}
+{% load bootstrap3 %}
+
+{# step 2. registration complete #}
+
+{% block title %}
+注册完成 | 2014 SKA Summer School
+{% endblock %}
+
+{% block content %}
+ <div class="container">
+ <h2>注册完成</h2>
+ <p class="lead">
+ 您已顺利完成注册。我们已向您注册使用的邮箱发送了激活邮件,请留意查收,并使用其中的链接激活账户。
+ </p>
+
+ <br />
+ <p>
+ 还未收到激活邮件?
+ <a href="#" class="btn btn-default">重新发送激活邮件</a>
+ </p>
+ </div>
+{% endblock %}
+
+{# vim: set ts=8 sw=2 tw=0 fenc=utf-8 ft=htmldjango.html: #}
diff --git a/templates/registration/registration_form.html b/templates/registration/registration_form.html
new file mode 100644
index 0000000..90144ec
--- /dev/null
+++ b/templates/registration/registration_form.html
@@ -0,0 +1,22 @@
+{% extends 'base.html' %}
+{% load staticfiles %}
+{% load url from future %}
+{% load bootstrap3 %}
+
+{# step 1. registration #}
+
+{% block title %}
+注册 | 2014 SKA Summer School
+{% endblock %}
+
+{% block content %}
+ <div class="container">
+ <form role="form" class="form-horizontal" method="post">
+ {% csrf_token %}
+ {% bootstrap_form form layout='horizontal' %}
+ {% buttons submit='OK' reset='Cancel' layout='horizontal' %}{% endbuttons %}
+ </form>
+ </div>
+{% endblock %}
+
+{# vim: set ts=8 sw=2 tw=0 fenc=utf-8 ft=htmldjango.html: #}