From 88c4fa2c87138d9f4707ad7193662953f9de725f Mon Sep 17 00:00:00 2001 From: Weitian LI Date: Tue, 24 Jun 2014 23:09:43 +0800 Subject: Added schedule.html template for app 'schedule'. * added 'schedule.views.ScheduleView' * added 'schedule.html' template, with 'schedule.css' and 'schedule.js' * added 'schedule.urls', updated django_skaschool.urls * added tools/templatetags/dict_utils.py * converted schedule models to south-based * removed original 'page/templates/page/program.html', related urls * updated navbar.html --- schedule/migrations/0001_initial.py | 76 +++++++++++++++++++++++++++++++++++++ schedule/migrations/__init__.py | 0 2 files changed, 76 insertions(+) create mode 100644 schedule/migrations/0001_initial.py create mode 100644 schedule/migrations/__init__.py (limited to 'schedule/migrations') diff --git a/schedule/migrations/0001_initial.py b/schedule/migrations/0001_initial.py new file mode 100644 index 0000000..3e14bd9 --- /dev/null +++ b/schedule/migrations/0001_initial.py @@ -0,0 +1,76 @@ +# -*- 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 'Event' + db.create_table(u'schedule_event', ( + (u'id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), + ('title', self.gf('django.db.models.fields.CharField')(max_length=100)), + ('person', self.gf('django.db.models.fields.CharField')(max_length=50)), + ('date', self.gf('django.db.models.fields.DateField')()), + ('time_start', self.gf('django.db.models.fields.TimeField')()), + ('time_end', self.gf('django.db.models.fields.TimeField')()), + ('contents', self.gf('django.db.models.fields.TextField')(blank=True)), + ('updated_at', self.gf('django.db.models.fields.DateTimeField')(auto_now=True, auto_now_add=True, blank=True)), + )) + db.send_create_signal(u'schedule', ['Event']) + + # Adding model 'EventAttachment' + db.create_table(u'schedule_eventattachment', ( + (u'id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), + ('title', self.gf('django.db.models.fields.CharField')(max_length=100)), + ('description', self.gf('django.db.models.fields.TextField')(blank=True)), + ('attachment', self.gf('django.db.models.fields.files.FileField')(max_length=100)), + ('content_type', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['contenttypes.ContentType'])), + ('object_id', self.gf('django.db.models.fields.PositiveIntegerField')()), + ('updated_at', self.gf('django.db.models.fields.DateTimeField')(auto_now=True, auto_now_add=True, blank=True)), + )) + db.send_create_signal(u'schedule', ['EventAttachment']) + + + def backwards(self, orm): + # Deleting model 'Event' + db.delete_table(u'schedule_event') + + # Deleting model 'EventAttachment' + db.delete_table(u'schedule_eventattachment') + + + models = { + 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'}) + }, + u'schedule.event': { + 'Meta': {'ordering': "['date', 'time_start']", 'object_name': 'Event'}, + 'contents': ('django.db.models.fields.TextField', [], {'blank': 'True'}), + 'date': ('django.db.models.fields.DateField', [], {}), + u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'person': ('django.db.models.fields.CharField', [], {'max_length': '50'}), + 'time_end': ('django.db.models.fields.TimeField', [], {}), + 'time_start': ('django.db.models.fields.TimeField', [], {}), + 'title': ('django.db.models.fields.CharField', [], {'max_length': '100'}), + 'updated_at': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'auto_now_add': 'True', 'blank': 'True'}) + }, + u'schedule.eventattachment': { + 'Meta': {'object_name': 'EventAttachment'}, + 'attachment': ('django.db.models.fields.files.FileField', [], {'max_length': '100'}), + 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['contenttypes.ContentType']"}), + 'description': ('django.db.models.fields.TextField', [], {'blank': 'True'}), + u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'object_id': ('django.db.models.fields.PositiveIntegerField', [], {}), + 'title': ('django.db.models.fields.CharField', [], {'max_length': '100'}), + 'updated_at': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'auto_now_add': 'True', 'blank': 'True'}) + } + } + + complete_apps = ['schedule'] \ No newline at end of file diff --git a/schedule/migrations/__init__.py b/schedule/migrations/__init__.py new file mode 100644 index 0000000..e69de29 -- cgit v1.2.2