From d477d14d624bea299a62199799607155d43a4226 Mon Sep 17 00:00:00 2001 From: Weitian LI Date: Sun, 20 Apr 2014 16:17:47 +0800 Subject: * 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 --- page/README.txt | 5 +++++ page/migrations/0001_initial.py | 20 ++++++++++++++++++++ page/migrations/__init__.py | 0 page/urls.py | 6 +++++- page/views.py | 14 +++++++++++++- 5 files changed, 43 insertions(+), 2 deletions(-) create mode 100644 page/README.txt create mode 100644 page/migrations/0001_initial.py create mode 100644 page/migrations/__init__.py (limited to 'page') 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 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. -- cgit v1.2.2