diff options
author | Weitian LI <liweitianux@gmail.com> | 2014-06-24 23:09:43 +0800 |
---|---|---|
committer | Weitian LI <liweitianux@gmail.com> | 2014-06-24 23:09:43 +0800 |
commit | 88c4fa2c87138d9f4707ad7193662953f9de725f (patch) | |
tree | 0185998a92184d0c5b76513d0c94774a06274432 /schedule/migrations/0001_initial.py | |
parent | af609a29bee3bc17800cf061c66b6eabcf18234f (diff) | |
download | django-skaschool-88c4fa2c87138d9f4707ad7193662953f9de725f.tar.bz2 |
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
Diffstat (limited to 'schedule/migrations/0001_initial.py')
-rw-r--r-- | schedule/migrations/0001_initial.py | 76 |
1 files changed, 76 insertions, 0 deletions
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 |