From: Stephen Burrows Date: Tue, 29 Mar 2011 18:16:55 +0000 (-0400) Subject: Julian improvements: Made calendar events optional and made calendar feed uuids auto... X-Git-Tag: philo-0.9~16^2~4 X-Git-Url: http://git.ithinksw.org/philo.git/commitdiff_plain/9e740fe6e535570620ddda6edf6fe6398e579079?ds=inline;hp=--cc Julian improvements: Made calendar events optional and made calendar feed uuids auto-generated. Reset the migrations because south wasn't cooperating. --- 9e740fe6e535570620ddda6edf6fe6398e579079 diff --git a/contrib/julian/admin.py b/contrib/julian/admin.py index 10bc6f9..72bdef7 100644 --- a/contrib/julian/admin.py +++ b/contrib/julian/admin.py @@ -40,7 +40,7 @@ class CalendarAdmin(EntityAdmin): 'fields': ('name', 'description', 'events') }), ('Advanced', { - 'fields': ('slug', 'uuid'), + 'fields': ('slug', 'site', 'language',), 'classes': COLLAPSE_CLASSES }) ) @@ -70,6 +70,8 @@ class CalendarViewAdmin(EntityAdmin): 'classes': COLLAPSE_CLASSES }) ) + raw_id_fields = ('index_page', 'event_detail_page', 'timespan_page', 'tag_page', 'location_page', 'owner_page', 'location_archive_page', 'tag_archive_page', 'owner_archive_page', 'item_title_template', 'item_description_template',) + related_lookup_fields = {'fk': raw_id_fields} admin.site.register(Location, LocationAdmin) diff --git a/contrib/julian/migrations/0001_initial.py b/contrib/julian/migrations/0001_initial.py index d4864c6..e52b74f 100644 --- a/contrib/julian/migrations/0001_initial.py +++ b/contrib/julian/migrations/0001_initial.py @@ -12,6 +12,7 @@ class Migration(SchemaMigration): db.create_table('julian_location', ( ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), ('name', self.gf('django.db.models.fields.CharField')(max_length=255)), + ('slug', self.gf('django.db.models.fields.SlugField')(unique=True, max_length=255, db_index=True)), )) db.send_create_signal('julian', ['Location']) @@ -24,11 +25,14 @@ class Migration(SchemaMigration): ('end_time', self.gf('django.db.models.fields.TimeField')(null=True, blank=True)), ('name', self.gf('django.db.models.fields.CharField')(max_length=255)), ('slug', self.gf('django.db.models.fields.SlugField')(max_length=255, db_index=True)), - ('location_content_type', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['contenttypes.ContentType'])), - ('location_pk', self.gf('django.db.models.fields.TextField')()), + ('location_content_type', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['contenttypes.ContentType'], null=True, blank=True)), + ('location_pk', self.gf('django.db.models.fields.TextField')(blank=True)), ('description', self.gf('philo.models.fields.TemplateField')()), ('parent_event', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['julian.Event'], null=True, blank=True)), - ('owner', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['auth.User'])), + ('owner', self.gf('django.db.models.fields.related.ForeignKey')(related_name='owned_events', to=orm['auth.User'])), + ('created', self.gf('django.db.models.fields.DateTimeField')(auto_now_add=True, blank=True)), + ('last_modified', self.gf('django.db.models.fields.DateTimeField')(auto_now=True, blank=True)), + ('uuid', self.gf('django.db.models.fields.TextField')()), )) db.send_create_signal('julian', ['Event']) @@ -44,10 +48,16 @@ class Migration(SchemaMigration): db.create_table('julian_calendar', ( ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), ('name', self.gf('django.db.models.fields.CharField')(max_length=100)), - ('uuid', self.gf('django.db.models.fields.CharField')(unique=True, max_length=100)), + ('slug', self.gf('django.db.models.fields.SlugField')(max_length=100, db_index=True)), + ('description', self.gf('django.db.models.fields.TextField')(blank=True)), + ('site', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['sites.Site'])), + ('language', self.gf('django.db.models.fields.CharField')(default='en', max_length=5)), )) db.send_create_signal('julian', ['Calendar']) + # Adding unique constraint on 'Calendar', fields ['name', 'site', 'language'] + db.create_unique('julian_calendar', ['name', 'site_id', 'language']) + # Adding M2M table for field events on 'Calendar' db.create_table('julian_calendar_events', ( ('id', models.AutoField(verbose_name='ID', primary_key=True, auto_created=True)), @@ -56,9 +66,38 @@ class Migration(SchemaMigration): )) db.create_unique('julian_calendar_events', ['calendar_id', 'event_id']) + # Adding model 'CalendarView' + db.create_table('julian_calendarview', ( + ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), + ('feed_type', self.gf('django.db.models.fields.CharField')(default='text/calendar', max_length=50)), + ('feed_suffix', self.gf('django.db.models.fields.CharField')(default='feed', max_length=255)), + ('feeds_enabled', self.gf('django.db.models.fields.BooleanField')(default=True)), + ('feed_length', self.gf('django.db.models.fields.PositiveIntegerField')(default=15, null=True, blank=True)), + ('item_title_template', self.gf('django.db.models.fields.related.ForeignKey')(blank=True, related_name='julian_calendarview_title_related', null=True, to=orm['philo.Template'])), + ('item_description_template', self.gf('django.db.models.fields.related.ForeignKey')(blank=True, related_name='julian_calendarview_description_related', null=True, to=orm['philo.Template'])), + ('calendar', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['julian.Calendar'])), + ('index_page', self.gf('django.db.models.fields.related.ForeignKey')(related_name='calendar_index_related', to=orm['philo.Page'])), + ('event_detail_page', self.gf('django.db.models.fields.related.ForeignKey')(related_name='calendar_detail_related', to=orm['philo.Page'])), + ('timespan_page', self.gf('django.db.models.fields.related.ForeignKey')(blank=True, related_name='calendar_timespan_related', null=True, to=orm['philo.Page'])), + ('tag_page', self.gf('django.db.models.fields.related.ForeignKey')(blank=True, related_name='calendar_tag_related', null=True, to=orm['philo.Page'])), + ('location_page', self.gf('django.db.models.fields.related.ForeignKey')(blank=True, related_name='calendar_location_related', null=True, to=orm['philo.Page'])), + ('owner_page', self.gf('django.db.models.fields.related.ForeignKey')(blank=True, related_name='calendar_owner_related', null=True, to=orm['philo.Page'])), + ('tag_archive_page', self.gf('django.db.models.fields.related.ForeignKey')(blank=True, related_name='calendar_tag_archive_related', null=True, to=orm['philo.Page'])), + ('location_archive_page', self.gf('django.db.models.fields.related.ForeignKey')(blank=True, related_name='calendar_location_archive_related', null=True, to=orm['philo.Page'])), + ('owner_archive_page', self.gf('django.db.models.fields.related.ForeignKey')(blank=True, related_name='calendar_owner_archive_related', null=True, to=orm['philo.Page'])), + ('tag_permalink_base', self.gf('django.db.models.fields.CharField')(default='tags', max_length=30)), + ('owner_permalink_base', self.gf('django.db.models.fields.CharField')(default='owners', max_length=30)), + ('location_permalink_base', self.gf('django.db.models.fields.CharField')(default='locations', max_length=30)), + ('events_per_page', self.gf('django.db.models.fields.PositiveIntegerField')(null=True, blank=True)), + )) + db.send_create_signal('julian', ['CalendarView']) + def backwards(self, orm): + # Removing unique constraint on 'Calendar', fields ['name', 'site', 'language'] + db.delete_unique('julian_calendar', ['name', 'site_id', 'language']) + # Deleting model 'Location' db.delete_table('julian_location') @@ -74,6 +113,9 @@ class Migration(SchemaMigration): # Removing M2M table for field events on 'Calendar' db.delete_table('julian_calendar_events') + # Deleting model 'CalendarView' + db.delete_table('julian_calendarview') + models = { 'auth.group': { @@ -83,7 +125,7 @@ class Migration(SchemaMigration): 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}) }, 'auth.permission': { - 'Meta': {'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'}, + 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'}, 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}), 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}), 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), @@ -96,9 +138,9 @@ class Migration(SchemaMigration): 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}), 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True', 'blank': 'True'}), - 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'blank': 'True'}), - 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'blank': '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'}), @@ -106,39 +148,78 @@ class Migration(SchemaMigration): 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) }, 'contenttypes.contenttype': { - 'Meta': {'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"}, + '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'}), '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'}) }, 'julian.calendar': { - 'Meta': {'object_name': 'Calendar'}, - 'events': ('django.db.models.fields.related.ManyToManyField', [], {'related_name': "'calendars'", 'symmetrical': 'False', 'to': "orm['julian.Event']"}), + 'Meta': {'unique_together': "(('name', 'site', 'language'),)", 'object_name': 'Calendar'}, + 'description': ('django.db.models.fields.TextField', [], {'blank': 'True'}), + 'events': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'related_name': "'calendars'", 'blank': 'True', 'to': "orm['julian.Event']"}), 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'language': ('django.db.models.fields.CharField', [], {'default': "'en'", 'max_length': '5'}), 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'uuid': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '100'}) + 'site': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['sites.Site']"}), + 'slug': ('django.db.models.fields.SlugField', [], {'max_length': '100', 'db_index': 'True'}) + }, + 'julian.calendarview': { + 'Meta': {'object_name': 'CalendarView'}, + 'calendar': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['julian.Calendar']"}), + 'event_detail_page': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'calendar_detail_related'", 'to': "orm['philo.Page']"}), + 'events_per_page': ('django.db.models.fields.PositiveIntegerField', [], {'null': 'True', 'blank': 'True'}), + 'feed_length': ('django.db.models.fields.PositiveIntegerField', [], {'default': '15', 'null': 'True', 'blank': 'True'}), + 'feed_suffix': ('django.db.models.fields.CharField', [], {'default': "'feed'", 'max_length': '255'}), + 'feed_type': ('django.db.models.fields.CharField', [], {'default': "'text/calendar'", 'max_length': '50'}), + 'feeds_enabled': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'index_page': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'calendar_index_related'", 'to': "orm['philo.Page']"}), + 'item_description_template': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'julian_calendarview_description_related'", 'null': 'True', 'to': "orm['philo.Template']"}), + 'item_title_template': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'julian_calendarview_title_related'", 'null': 'True', 'to': "orm['philo.Template']"}), + 'location_archive_page': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'calendar_location_archive_related'", 'null': 'True', 'to': "orm['philo.Page']"}), + 'location_page': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'calendar_location_related'", 'null': 'True', 'to': "orm['philo.Page']"}), + 'location_permalink_base': ('django.db.models.fields.CharField', [], {'default': "'locations'", 'max_length': '30'}), + 'owner_archive_page': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'calendar_owner_archive_related'", 'null': 'True', 'to': "orm['philo.Page']"}), + 'owner_page': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'calendar_owner_related'", 'null': 'True', 'to': "orm['philo.Page']"}), + 'owner_permalink_base': ('django.db.models.fields.CharField', [], {'default': "'owners'", 'max_length': '30'}), + 'tag_archive_page': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'calendar_tag_archive_related'", 'null': 'True', 'to': "orm['philo.Page']"}), + 'tag_page': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'calendar_tag_related'", 'null': 'True', 'to': "orm['philo.Page']"}), + 'tag_permalink_base': ('django.db.models.fields.CharField', [], {'default': "'tags'", 'max_length': '30'}), + 'timespan_page': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'calendar_timespan_related'", 'null': 'True', 'to': "orm['philo.Page']"}) }, 'julian.event': { 'Meta': {'object_name': 'Event'}, + 'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), 'description': ('philo.models.fields.TemplateField', [], {}), 'end_date': ('django.db.models.fields.DateField', [], {}), 'end_time': ('django.db.models.fields.TimeField', [], {'null': 'True', 'blank': 'True'}), 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'location_content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}), - 'location_pk': ('django.db.models.fields.TextField', [], {}), + 'last_modified': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}), + 'location_content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']", 'null': 'True', 'blank': 'True'}), + 'location_pk': ('django.db.models.fields.TextField', [], {'blank': 'True'}), 'name': ('django.db.models.fields.CharField', [], {'max_length': '255'}), - 'owner': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}), + 'owner': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'owned_events'", 'to': "orm['auth.User']"}), 'parent_event': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['julian.Event']", 'null': 'True', 'blank': 'True'}), 'slug': ('django.db.models.fields.SlugField', [], {'max_length': '255', 'db_index': 'True'}), 'start_date': ('django.db.models.fields.DateField', [], {}), 'start_time': ('django.db.models.fields.TimeField', [], {'null': 'True', 'blank': 'True'}), - 'tags': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'to': "orm['philo.Tag']", 'null': 'True', 'blank': 'True'}) + 'tags': ('django.db.models.fields.related.ManyToManyField', [], {'blank': 'True', 'related_name': "'events'", 'null': 'True', 'symmetrical': 'False', 'to': "orm['philo.Tag']"}), + 'uuid': ('django.db.models.fields.TextField', [], {}) }, 'julian.location': { 'Meta': {'object_name': 'Location'}, 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '255'}) + 'name': ('django.db.models.fields.CharField', [], {'max_length': '255'}), + 'slug': ('django.db.models.fields.SlugField', [], {'unique': 'True', 'max_length': '255', 'db_index': 'True'}) + }, + 'oberlin.locationcoordinates': { + 'Meta': {'unique_together': "(('location_ct', 'location_pk'),)", 'object_name': 'LocationCoordinates'}, + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'latitude': ('django.db.models.fields.FloatField', [], {}), + 'location_ct': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}), + 'location_pk': ('django.db.models.fields.TextField', [], {}), + 'longitude': ('django.db.models.fields.FloatField', [], {}) }, 'philo.attribute': { 'Meta': {'unique_together': "(('key', 'entity_content_type', 'entity_object_id'), ('value_content_type', 'value_object_id'))", 'object_name': 'Attribute'}, @@ -149,11 +230,50 @@ class Migration(SchemaMigration): 'value_content_type': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'attribute_value_set'", 'null': 'True', 'to': "orm['contenttypes.ContentType']"}), 'value_object_id': ('django.db.models.fields.PositiveIntegerField', [], {'db_index': 'True', 'null': 'True', 'blank': 'True'}) }, + 'philo.node': { + 'Meta': {'object_name': 'Node'}, + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'level': ('django.db.models.fields.PositiveIntegerField', [], {'db_index': 'True'}), + 'lft': ('django.db.models.fields.PositiveIntegerField', [], {'db_index': 'True'}), + 'parent': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'children'", 'null': 'True', 'to': "orm['philo.Node']"}), + 'rght': ('django.db.models.fields.PositiveIntegerField', [], {'db_index': 'True'}), + 'slug': ('django.db.models.fields.SlugField', [], {'max_length': '255', 'db_index': 'True'}), + 'tree_id': ('django.db.models.fields.PositiveIntegerField', [], {'db_index': 'True'}), + 'view_content_type': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'node_view_set'", 'to': "orm['contenttypes.ContentType']"}), + 'view_object_id': ('django.db.models.fields.PositiveIntegerField', [], {}) + }, + 'philo.page': { + 'Meta': {'object_name': 'Page'}, + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'template': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'pages'", 'to': "orm['philo.Template']"}), + 'title': ('django.db.models.fields.CharField', [], {'max_length': '255'}) + }, 'philo.tag': { - 'Meta': {'object_name': 'Tag'}, + 'Meta': {'ordering': "('name',)", 'object_name': 'Tag'}, 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), 'name': ('django.db.models.fields.CharField', [], {'max_length': '255'}), 'slug': ('django.db.models.fields.SlugField', [], {'unique': 'True', 'max_length': '255', 'db_index': 'True'}) + }, + 'philo.template': { + 'Meta': {'object_name': 'Template'}, + 'code': ('philo.models.fields.TemplateField', [], {}), + 'documentation': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'level': ('django.db.models.fields.PositiveIntegerField', [], {'db_index': 'True'}), + 'lft': ('django.db.models.fields.PositiveIntegerField', [], {'db_index': 'True'}), + 'mimetype': ('django.db.models.fields.CharField', [], {'default': "'text/html'", 'max_length': '255'}), + 'name': ('django.db.models.fields.CharField', [], {'max_length': '255'}), + 'parent': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'children'", 'null': 'True', 'to': "orm['philo.Template']"}), + 'rght': ('django.db.models.fields.PositiveIntegerField', [], {'db_index': 'True'}), + 'slug': ('django.db.models.fields.SlugField', [], {'max_length': '255', 'db_index': 'True'}), + 'tree_id': ('django.db.models.fields.PositiveIntegerField', [], {'db_index': 'True'}) + }, + 'sites.site': { + 'Meta': {'ordering': "('domain',)", 'object_name': 'Site', 'db_table': "'django_site'"}, + 'domain': ('django.db.models.fields.CharField', [], {'max_length': '100'}), + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}), + 'root_node': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'sites'", 'null': 'True', 'to': "orm['philo.Node']"}) } } diff --git a/contrib/julian/migrations/0002_auto__add_field_event_created__add_field_event_last_modified__add_fiel.py b/contrib/julian/migrations/0002_auto__add_field_event_created__add_field_event_last_modified__add_fiel.py deleted file mode 100644 index c0c2fad..0000000 --- a/contrib/julian/migrations/0002_auto__add_field_event_created__add_field_event_last_modified__add_fiel.py +++ /dev/null @@ -1,138 +0,0 @@ -# encoding: utf-8 -import 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 'Event.created' - db.add_column('julian_event', 'created', self.gf('django.db.models.fields.DateTimeField')(auto_now_add=True, default=datetime.datetime(2011, 2, 10, 15, 14, 35, 721341), blank=True), keep_default=False) - - # Adding field 'Event.last_modified' - db.add_column('julian_event', 'last_modified', self.gf('django.db.models.fields.DateTimeField')(auto_now=True, default=datetime.datetime(2011, 2, 10, 15, 14, 42, 370147), blank=True), keep_default=False) - - # Adding field 'Event.uuid' - db.add_column('julian_event', 'uuid', self.gf('django.db.models.fields.TextField')(default=''), keep_default=False) - - # Adding field 'Calendar.slug' - db.add_column('julian_calendar', 'slug', self.gf('django.db.models.fields.SlugField')(default='', max_length=100, db_index=True), keep_default=False) - - # Adding field 'Calendar.description' - db.add_column('julian_calendar', 'description', self.gf('django.db.models.fields.TextField')(default='', blank=True), keep_default=False) - - # Changing field 'Calendar.uuid' - db.alter_column('julian_calendar', 'uuid', self.gf('django.db.models.fields.TextField')(unique=True)) - - - def backwards(self, orm): - - # Deleting field 'Event.created' - db.delete_column('julian_event', 'created') - - # Deleting field 'Event.last_modified' - db.delete_column('julian_event', 'last_modified') - - # Deleting field 'Event.uuid' - db.delete_column('julian_event', 'uuid') - - # Deleting field 'Calendar.slug' - db.delete_column('julian_calendar', 'slug') - - # Deleting field 'Calendar.description' - db.delete_column('julian_calendar', 'description') - - # Changing field 'Calendar.uuid' - db.alter_column('julian_calendar', 'uuid', self.gf('django.db.models.fields.CharField')(max_length=100, unique=True)) - - - models = { - 'auth.group': { - 'Meta': {'object_name': 'Group'}, - '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': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}) - }, - 'auth.permission': { - 'Meta': {'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'}, - 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) - }, - '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', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True', 'blank': 'True'}), - 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'blank': 'True'}), - 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'blank': 'True'}), - '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', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}), - 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) - }, - 'contenttypes.contenttype': { - 'Meta': {'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"}, - 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - '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'}) - }, - 'julian.calendar': { - 'Meta': {'object_name': 'Calendar'}, - 'description': ('django.db.models.fields.TextField', [], {'blank': 'True'}), - 'events': ('django.db.models.fields.related.ManyToManyField', [], {'related_name': "'calendars'", 'symmetrical': 'False', 'to': "orm['julian.Event']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'slug': ('django.db.models.fields.SlugField', [], {'max_length': '100', 'db_index': 'True'}), - 'uuid': ('django.db.models.fields.TextField', [], {'unique': 'True'}) - }, - 'julian.event': { - 'Meta': {'object_name': 'Event'}, - 'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'description': ('philo.models.fields.TemplateField', [], {}), - 'end_date': ('django.db.models.fields.DateField', [], {}), - 'end_time': ('django.db.models.fields.TimeField', [], {'null': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'last_modified': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}), - 'location_content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}), - 'location_pk': ('django.db.models.fields.TextField', [], {}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '255'}), - 'owner': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}), - 'parent_event': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['julian.Event']", 'null': 'True', 'blank': 'True'}), - 'slug': ('django.db.models.fields.SlugField', [], {'max_length': '255', 'db_index': 'True'}), - 'start_date': ('django.db.models.fields.DateField', [], {}), - 'start_time': ('django.db.models.fields.TimeField', [], {'null': 'True', 'blank': 'True'}), - 'tags': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'to': "orm['philo.Tag']", 'null': 'True', 'blank': 'True'}), - 'uuid': ('django.db.models.fields.TextField', [], {}) - }, - 'julian.location': { - 'Meta': {'object_name': 'Location'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '255'}) - }, - 'philo.attribute': { - 'Meta': {'unique_together': "(('key', 'entity_content_type', 'entity_object_id'), ('value_content_type', 'value_object_id'))", 'object_name': 'Attribute'}, - 'entity_content_type': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'attribute_entity_set'", 'to': "orm['contenttypes.ContentType']"}), - 'entity_object_id': ('django.db.models.fields.PositiveIntegerField', [], {'db_index': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'key': ('django.db.models.fields.CharField', [], {'max_length': '255', 'db_index': 'True'}), - 'value_content_type': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'attribute_value_set'", 'null': 'True', 'to': "orm['contenttypes.ContentType']"}), - 'value_object_id': ('django.db.models.fields.PositiveIntegerField', [], {'db_index': 'True', 'null': 'True', 'blank': 'True'}) - }, - 'philo.tag': { - 'Meta': {'object_name': 'Tag'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '255'}), - 'slug': ('django.db.models.fields.SlugField', [], {'unique': 'True', 'max_length': '255', 'db_index': 'True'}) - } - } - - complete_apps = ['julian'] diff --git a/contrib/julian/migrations/0003_auto__add_icalendarfeedview.py b/contrib/julian/migrations/0003_auto__add_icalendarfeedview.py deleted file mode 100644 index 0f31330..0000000 --- a/contrib/julian/migrations/0003_auto__add_icalendarfeedview.py +++ /dev/null @@ -1,153 +0,0 @@ -# encoding: utf-8 -import 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 'ICalendarFeedView' - db.create_table('julian_icalendarfeedview', ( - ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), - ('feed_type', self.gf('django.db.models.fields.CharField')(default='application/atom+xml', max_length=50)), - ('feed_suffix', self.gf('django.db.models.fields.CharField')(default='feed', max_length=255)), - ('feeds_enabled', self.gf('django.db.models.fields.BooleanField')(default=True, blank=True)), - ('item_title_template', self.gf('django.db.models.fields.related.ForeignKey')(blank=True, related_name='julian_icalendarfeedview_title_related', null=True, to=orm['philo.Template'])), - ('item_description_template', self.gf('django.db.models.fields.related.ForeignKey')(blank=True, related_name='julian_icalendarfeedview_description_related', null=True, to=orm['philo.Template'])), - ('calendar', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['julian.Calendar'])), - )) - db.send_create_signal('julian', ['ICalendarFeedView']) - - - def backwards(self, orm): - - # Deleting model 'ICalendarFeedView' - db.delete_table('julian_icalendarfeedview') - - - models = { - 'auth.group': { - 'Meta': {'object_name': 'Group'}, - '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': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}) - }, - 'auth.permission': { - 'Meta': {'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'}, - 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) - }, - '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', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True', 'blank': 'True'}), - 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'blank': 'True'}), - 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'blank': 'True'}), - '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', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}), - 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) - }, - 'contenttypes.contenttype': { - 'Meta': {'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"}, - 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - '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'}) - }, - 'julian.calendar': { - 'Meta': {'object_name': 'Calendar'}, - 'description': ('django.db.models.fields.TextField', [], {'blank': 'True'}), - 'events': ('django.db.models.fields.related.ManyToManyField', [], {'related_name': "'calendars'", 'symmetrical': 'False', 'to': "orm['julian.Event']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'slug': ('django.db.models.fields.SlugField', [], {'max_length': '100', 'db_index': 'True'}), - 'uuid': ('django.db.models.fields.TextField', [], {'unique': 'True'}) - }, - 'julian.event': { - 'Meta': {'object_name': 'Event'}, - 'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'description': ('philo.models.fields.TemplateField', [], {}), - 'end_date': ('django.db.models.fields.DateField', [], {}), - 'end_time': ('django.db.models.fields.TimeField', [], {'null': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'last_modified': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}), - 'location_content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}), - 'location_pk': ('django.db.models.fields.TextField', [], {}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '255'}), - 'owner': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}), - 'parent_event': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['julian.Event']", 'null': 'True', 'blank': 'True'}), - 'slug': ('django.db.models.fields.SlugField', [], {'max_length': '255', 'db_index': 'True'}), - 'start_date': ('django.db.models.fields.DateField', [], {}), - 'start_time': ('django.db.models.fields.TimeField', [], {'null': 'True', 'blank': 'True'}), - 'tags': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'to': "orm['philo.Tag']", 'null': 'True', 'blank': 'True'}), - 'uuid': ('django.db.models.fields.TextField', [], {}) - }, - 'julian.icalendarfeedview': { - 'Meta': {'object_name': 'ICalendarFeedView'}, - 'calendar': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['julian.Calendar']"}), - 'feed_suffix': ('django.db.models.fields.CharField', [], {'default': "'feed'", 'max_length': '255'}), - 'feed_type': ('django.db.models.fields.CharField', [], {'default': "'application/atom+xml'", 'max_length': '50'}), - 'feeds_enabled': ('django.db.models.fields.BooleanField', [], {'default': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'item_description_template': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'julian_icalendarfeedview_description_related'", 'null': 'True', 'to': "orm['philo.Template']"}), - 'item_title_template': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'julian_icalendarfeedview_title_related'", 'null': 'True', 'to': "orm['philo.Template']"}) - }, - 'julian.location': { - 'Meta': {'object_name': 'Location'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '255'}) - }, - 'philo.attribute': { - 'Meta': {'unique_together': "(('key', 'entity_content_type', 'entity_object_id'), ('value_content_type', 'value_object_id'))", 'object_name': 'Attribute'}, - 'entity_content_type': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'attribute_entity_set'", 'to': "orm['contenttypes.ContentType']"}), - 'entity_object_id': ('django.db.models.fields.PositiveIntegerField', [], {'db_index': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'key': ('django.db.models.fields.CharField', [], {'max_length': '255', 'db_index': 'True'}), - 'value_content_type': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'attribute_value_set'", 'null': 'True', 'to': "orm['contenttypes.ContentType']"}), - 'value_object_id': ('django.db.models.fields.PositiveIntegerField', [], {'db_index': 'True', 'null': 'True', 'blank': 'True'}) - }, - 'philo.node': { - 'Meta': {'object_name': 'Node'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'level': ('django.db.models.fields.PositiveIntegerField', [], {'db_index': 'True'}), - 'lft': ('django.db.models.fields.PositiveIntegerField', [], {'db_index': 'True'}), - 'parent': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'children'", 'null': 'True', 'to': "orm['philo.Node']"}), - 'rght': ('django.db.models.fields.PositiveIntegerField', [], {'db_index': 'True'}), - 'slug': ('django.db.models.fields.SlugField', [], {'max_length': '255', 'db_index': 'True'}), - 'tree_id': ('django.db.models.fields.PositiveIntegerField', [], {'db_index': 'True'}), - 'view_content_type': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'node_view_set'", 'to': "orm['contenttypes.ContentType']"}), - 'view_object_id': ('django.db.models.fields.PositiveIntegerField', [], {}) - }, - 'philo.tag': { - 'Meta': {'object_name': 'Tag'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '255'}), - 'slug': ('django.db.models.fields.SlugField', [], {'unique': 'True', 'max_length': '255', 'db_index': 'True'}) - }, - 'philo.template': { - 'Meta': {'object_name': 'Template'}, - 'code': ('philo.models.fields.TemplateField', [], {}), - 'documentation': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'level': ('django.db.models.fields.PositiveIntegerField', [], {'db_index': 'True'}), - 'lft': ('django.db.models.fields.PositiveIntegerField', [], {'db_index': 'True'}), - 'mimetype': ('django.db.models.fields.CharField', [], {'default': "'text/html'", 'max_length': '255'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '255'}), - 'parent': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'children'", 'null': 'True', 'to': "orm['philo.Template']"}), - 'rght': ('django.db.models.fields.PositiveIntegerField', [], {'db_index': 'True'}), - 'slug': ('django.db.models.fields.SlugField', [], {'max_length': '255', 'db_index': 'True'}), - 'tree_id': ('django.db.models.fields.PositiveIntegerField', [], {'db_index': 'True'}) - } - } - - complete_apps = ['julian'] diff --git a/contrib/julian/migrations/0004_auto__chg_field_event_location_content_type__chg_field_event_location_.py b/contrib/julian/migrations/0004_auto__chg_field_event_location_content_type__chg_field_event_location_.py deleted file mode 100644 index 42b5702..0000000 --- a/contrib/julian/migrations/0004_auto__chg_field_event_location_content_type__chg_field_event_location_.py +++ /dev/null @@ -1,150 +0,0 @@ -# encoding: utf-8 -import datetime -from south.db import db -from south.v2 import SchemaMigration -from django.db import models - -class Migration(SchemaMigration): - - def forwards(self, orm): - - # Changing field 'Event.location_content_type' - db.alter_column('julian_event', 'location_content_type_id', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['contenttypes.ContentType'], null=True, blank=True)) - - # Changing field 'Event.location_pk' - db.alter_column('julian_event', 'location_pk', self.gf('django.db.models.fields.TextField')(blank=True)) - - - def backwards(self, orm): - - # Changing field 'Event.location_content_type' - db.alter_column('julian_event', 'location_content_type_id', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['contenttypes.ContentType'])) - - # Changing field 'Event.location_pk' - db.alter_column('julian_event', 'location_pk', self.gf('django.db.models.fields.TextField')()) - - - models = { - 'auth.group': { - 'Meta': {'object_name': 'Group'}, - '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': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}) - }, - 'auth.permission': { - 'Meta': {'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'}, - 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) - }, - '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', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True', 'blank': 'True'}), - 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'blank': 'True'}), - 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'blank': 'True'}), - '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', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}), - 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) - }, - 'contenttypes.contenttype': { - 'Meta': {'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"}, - 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - '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'}) - }, - 'julian.calendar': { - 'Meta': {'object_name': 'Calendar'}, - 'description': ('django.db.models.fields.TextField', [], {'blank': 'True'}), - 'events': ('django.db.models.fields.related.ManyToManyField', [], {'related_name': "'calendars'", 'symmetrical': 'False', 'to': "orm['julian.Event']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'slug': ('django.db.models.fields.SlugField', [], {'max_length': '100', 'db_index': 'True'}), - 'uuid': ('django.db.models.fields.TextField', [], {'unique': 'True'}) - }, - 'julian.event': { - 'Meta': {'object_name': 'Event'}, - 'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'description': ('philo.models.fields.TemplateField', [], {}), - 'end_date': ('django.db.models.fields.DateField', [], {}), - 'end_time': ('django.db.models.fields.TimeField', [], {'null': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'last_modified': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}), - 'location_content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']", 'null': 'True', 'blank': 'True'}), - 'location_pk': ('django.db.models.fields.TextField', [], {'blank': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '255'}), - 'owner': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}), - 'parent_event': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['julian.Event']", 'null': 'True', 'blank': 'True'}), - 'slug': ('django.db.models.fields.SlugField', [], {'max_length': '255', 'db_index': 'True'}), - 'start_date': ('django.db.models.fields.DateField', [], {}), - 'start_time': ('django.db.models.fields.TimeField', [], {'null': 'True', 'blank': 'True'}), - 'tags': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'to': "orm['philo.Tag']", 'null': 'True', 'blank': 'True'}), - 'uuid': ('django.db.models.fields.TextField', [], {}) - }, - 'julian.icalendarfeedview': { - 'Meta': {'object_name': 'ICalendarFeedView'}, - 'calendar': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['julian.Calendar']"}), - 'feed_suffix': ('django.db.models.fields.CharField', [], {'default': "'feed'", 'max_length': '255'}), - 'feed_type': ('django.db.models.fields.CharField', [], {'default': "'application/atom+xml'", 'max_length': '50'}), - 'feeds_enabled': ('django.db.models.fields.BooleanField', [], {'default': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'item_description_template': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'julian_icalendarfeedview_description_related'", 'null': 'True', 'to': "orm['philo.Template']"}), - 'item_title_template': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'julian_icalendarfeedview_title_related'", 'null': 'True', 'to': "orm['philo.Template']"}) - }, - 'julian.location': { - 'Meta': {'object_name': 'Location'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '255'}) - }, - 'philo.attribute': { - 'Meta': {'unique_together': "(('key', 'entity_content_type', 'entity_object_id'), ('value_content_type', 'value_object_id'))", 'object_name': 'Attribute'}, - 'entity_content_type': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'attribute_entity_set'", 'to': "orm['contenttypes.ContentType']"}), - 'entity_object_id': ('django.db.models.fields.PositiveIntegerField', [], {'db_index': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'key': ('django.db.models.fields.CharField', [], {'max_length': '255', 'db_index': 'True'}), - 'value_content_type': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'attribute_value_set'", 'null': 'True', 'to': "orm['contenttypes.ContentType']"}), - 'value_object_id': ('django.db.models.fields.PositiveIntegerField', [], {'db_index': 'True', 'null': 'True', 'blank': 'True'}) - }, - 'philo.node': { - 'Meta': {'object_name': 'Node'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'level': ('django.db.models.fields.PositiveIntegerField', [], {'db_index': 'True'}), - 'lft': ('django.db.models.fields.PositiveIntegerField', [], {'db_index': 'True'}), - 'parent': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'children'", 'null': 'True', 'to': "orm['philo.Node']"}), - 'rght': ('django.db.models.fields.PositiveIntegerField', [], {'db_index': 'True'}), - 'slug': ('django.db.models.fields.SlugField', [], {'max_length': '255', 'db_index': 'True'}), - 'tree_id': ('django.db.models.fields.PositiveIntegerField', [], {'db_index': 'True'}), - 'view_content_type': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'node_view_set'", 'to': "orm['contenttypes.ContentType']"}), - 'view_object_id': ('django.db.models.fields.PositiveIntegerField', [], {}) - }, - 'philo.tag': { - 'Meta': {'object_name': 'Tag'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '255'}), - 'slug': ('django.db.models.fields.SlugField', [], {'unique': 'True', 'max_length': '255', 'db_index': 'True'}) - }, - 'philo.template': { - 'Meta': {'object_name': 'Template'}, - 'code': ('philo.models.fields.TemplateField', [], {}), - 'documentation': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'level': ('django.db.models.fields.PositiveIntegerField', [], {'db_index': 'True'}), - 'lft': ('django.db.models.fields.PositiveIntegerField', [], {'db_index': 'True'}), - 'mimetype': ('django.db.models.fields.CharField', [], {'default': "'text/html'", 'max_length': '255'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '255'}), - 'parent': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'children'", 'null': 'True', 'to': "orm['philo.Template']"}), - 'rght': ('django.db.models.fields.PositiveIntegerField', [], {'db_index': 'True'}), - 'slug': ('django.db.models.fields.SlugField', [], {'max_length': '255', 'db_index': 'True'}), - 'tree_id': ('django.db.models.fields.PositiveIntegerField', [], {'db_index': 'True'}) - } - } - - complete_apps = ['julian'] diff --git a/contrib/julian/migrations/0005_auto__del_icalendarfeedview__add_calendarview__add_field_location_slug.py b/contrib/julian/migrations/0005_auto__del_icalendarfeedview__add_calendarview__add_field_location_slug.py deleted file mode 100644 index e3bae80..0000000 --- a/contrib/julian/migrations/0005_auto__del_icalendarfeedview__add_calendarview__add_field_location_slug.py +++ /dev/null @@ -1,205 +0,0 @@ -# encoding: utf-8 -import datetime -from south.db import db -from south.v2 import SchemaMigration -from django.db import models - -class Migration(SchemaMigration): - - def forwards(self, orm): - - # Deleting model 'ICalendarFeedView' - db.delete_table('julian_icalendarfeedview') - - # Adding model 'CalendarView' - db.create_table('julian_calendarview', ( - ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), - ('feed_type', self.gf('django.db.models.fields.CharField')(default='text/calendar', max_length=50)), - ('feed_suffix', self.gf('django.db.models.fields.CharField')(default='feed', max_length=255)), - ('feeds_enabled', self.gf('django.db.models.fields.BooleanField')(default=True, blank=True)), - ('item_title_template', self.gf('django.db.models.fields.related.ForeignKey')(blank=True, related_name='julian_calendarview_title_related', null=True, to=orm['philo.Template'])), - ('item_description_template', self.gf('django.db.models.fields.related.ForeignKey')(blank=True, related_name='julian_calendarview_description_related', null=True, to=orm['philo.Template'])), - ('calendar', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['julian.Calendar'])), - ('index_page', self.gf('django.db.models.fields.related.ForeignKey')(related_name='calendar_index_related', to=orm['philo.Page'])), - ('timespan_page', self.gf('django.db.models.fields.related.ForeignKey')(related_name='calendar_timespan_related', to=orm['philo.Page'])), - ('event_detail_page', self.gf('django.db.models.fields.related.ForeignKey')(related_name='calendar_detail_related', to=orm['philo.Page'])), - ('tag_page', self.gf('django.db.models.fields.related.ForeignKey')(related_name='calendar_tag_related', to=orm['philo.Page'])), - ('location_page', self.gf('django.db.models.fields.related.ForeignKey')(related_name='calendar_location_related', to=orm['philo.Page'])), - ('owner_page', self.gf('django.db.models.fields.related.ForeignKey')(related_name='calendar_owner_related', to=orm['philo.Page'])), - ('tag_archive_page', self.gf('django.db.models.fields.related.ForeignKey')(blank=True, related_name='calendar_tag_archive_related', null=True, to=orm['philo.Page'])), - ('location_archive_page', self.gf('django.db.models.fields.related.ForeignKey')(blank=True, related_name='calendar_location_archive_related', null=True, to=orm['philo.Page'])), - ('owner_archive_page', self.gf('django.db.models.fields.related.ForeignKey')(blank=True, related_name='calendar_owner_archive_related', null=True, to=orm['philo.Page'])), - ('tag_permalink_base', self.gf('django.db.models.fields.CharField')(default='tags', max_length=30)), - ('owner_permalink_base', self.gf('django.db.models.fields.CharField')(default='owner', max_length=30)), - ('location_permalink_base', self.gf('django.db.models.fields.CharField')(default='location', max_length=30)), - )) - db.send_create_signal('julian', ['CalendarView']) - - # Adding field 'Location.slug' - db.add_column('julian_location', 'slug', self.gf('django.db.models.fields.SlugField')(default='slug', unique=True, max_length=255, db_index=True), keep_default=False) - - - def backwards(self, orm): - - # Adding model 'ICalendarFeedView' - db.create_table('julian_icalendarfeedview', ( - ('item_title_template', self.gf('django.db.models.fields.related.ForeignKey')(related_name='julian_icalendarfeedview_title_related', null=True, to=orm['philo.Template'], blank=True)), - ('feed_type', self.gf('django.db.models.fields.CharField')(default='application/atom+xml', max_length=50)), - ('item_description_template', self.gf('django.db.models.fields.related.ForeignKey')(related_name='julian_icalendarfeedview_description_related', null=True, to=orm['philo.Template'], blank=True)), - ('feeds_enabled', self.gf('django.db.models.fields.BooleanField')(default=True, blank=True)), - ('calendar', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['julian.Calendar'])), - ('feed_suffix', self.gf('django.db.models.fields.CharField')(default='feed', max_length=255)), - ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), - )) - db.send_create_signal('julian', ['ICalendarFeedView']) - - # Deleting model 'CalendarView' - db.delete_table('julian_calendarview') - - # Deleting field 'Location.slug' - db.delete_column('julian_location', 'slug') - - - models = { - 'auth.group': { - 'Meta': {'object_name': 'Group'}, - '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': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}) - }, - 'auth.permission': { - 'Meta': {'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'}, - 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) - }, - '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', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True', 'blank': 'True'}), - 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'blank': 'True'}), - 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'blank': 'True'}), - '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', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}), - 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) - }, - 'contenttypes.contenttype': { - 'Meta': {'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"}, - 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - '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'}) - }, - 'julian.calendar': { - 'Meta': {'object_name': 'Calendar'}, - 'description': ('django.db.models.fields.TextField', [], {'blank': 'True'}), - 'events': ('django.db.models.fields.related.ManyToManyField', [], {'related_name': "'calendars'", 'symmetrical': 'False', 'to': "orm['julian.Event']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'slug': ('django.db.models.fields.SlugField', [], {'max_length': '100', 'db_index': 'True'}), - 'uuid': ('django.db.models.fields.TextField', [], {'unique': 'True'}) - }, - 'julian.calendarview': { - 'Meta': {'object_name': 'CalendarView'}, - 'calendar': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['julian.Calendar']"}), - 'event_detail_page': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'calendar_detail_related'", 'to': "orm['philo.Page']"}), - 'feed_suffix': ('django.db.models.fields.CharField', [], {'default': "'feed'", 'max_length': '255'}), - 'feed_type': ('django.db.models.fields.CharField', [], {'default': "'text/calendar'", 'max_length': '50'}), - 'feeds_enabled': ('django.db.models.fields.BooleanField', [], {'default': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'index_page': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'calendar_index_related'", 'to': "orm['philo.Page']"}), - 'item_description_template': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'julian_calendarview_description_related'", 'null': 'True', 'to': "orm['philo.Template']"}), - 'item_title_template': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'julian_calendarview_title_related'", 'null': 'True', 'to': "orm['philo.Template']"}), - 'location_archive_page': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'calendar_location_archive_related'", 'null': 'True', 'to': "orm['philo.Page']"}), - 'location_page': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'calendar_location_related'", 'to': "orm['philo.Page']"}), - 'location_permalink_base': ('django.db.models.fields.CharField', [], {'default': "'location'", 'max_length': '30'}), - 'owner_archive_page': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'calendar_owner_archive_related'", 'null': 'True', 'to': "orm['philo.Page']"}), - 'owner_page': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'calendar_owner_related'", 'to': "orm['philo.Page']"}), - 'owner_permalink_base': ('django.db.models.fields.CharField', [], {'default': "'owner'", 'max_length': '30'}), - 'tag_archive_page': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'calendar_tag_archive_related'", 'null': 'True', 'to': "orm['philo.Page']"}), - 'tag_page': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'calendar_tag_related'", 'to': "orm['philo.Page']"}), - 'tag_permalink_base': ('django.db.models.fields.CharField', [], {'default': "'tags'", 'max_length': '30'}), - 'timespan_page': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'calendar_timespan_related'", 'to': "orm['philo.Page']"}) - }, - 'julian.event': { - 'Meta': {'object_name': 'Event'}, - 'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'description': ('philo.models.fields.TemplateField', [], {}), - 'end_date': ('django.db.models.fields.DateField', [], {}), - 'end_time': ('django.db.models.fields.TimeField', [], {'null': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'last_modified': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}), - 'location_content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']", 'null': 'True', 'blank': 'True'}), - 'location_pk': ('django.db.models.fields.TextField', [], {'blank': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '255'}), - 'owner': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}), - 'parent_event': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['julian.Event']", 'null': 'True', 'blank': 'True'}), - 'slug': ('django.db.models.fields.SlugField', [], {'max_length': '255', 'db_index': 'True'}), - 'start_date': ('django.db.models.fields.DateField', [], {}), - 'start_time': ('django.db.models.fields.TimeField', [], {'null': 'True', 'blank': 'True'}), - 'tags': ('django.db.models.fields.related.ManyToManyField', [], {'blank': 'True', 'related_name': "'events'", 'null': 'True', 'symmetrical': 'False', 'to': "orm['philo.Tag']"}), - 'uuid': ('django.db.models.fields.TextField', [], {}) - }, - 'julian.location': { - 'Meta': {'object_name': 'Location'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '255'}), - 'slug': ('django.db.models.fields.SlugField', [], {'unique': 'True', 'max_length': '255', 'db_index': 'True'}) - }, - 'philo.attribute': { - 'Meta': {'unique_together': "(('key', 'entity_content_type', 'entity_object_id'), ('value_content_type', 'value_object_id'))", 'object_name': 'Attribute'}, - 'entity_content_type': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'attribute_entity_set'", 'to': "orm['contenttypes.ContentType']"}), - 'entity_object_id': ('django.db.models.fields.PositiveIntegerField', [], {'db_index': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'key': ('django.db.models.fields.CharField', [], {'max_length': '255', 'db_index': 'True'}), - 'value_content_type': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'attribute_value_set'", 'null': 'True', 'to': "orm['contenttypes.ContentType']"}), - 'value_object_id': ('django.db.models.fields.PositiveIntegerField', [], {'db_index': 'True', 'null': 'True', 'blank': 'True'}) - }, - 'philo.node': { - 'Meta': {'object_name': 'Node'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'level': ('django.db.models.fields.PositiveIntegerField', [], {'db_index': 'True'}), - 'lft': ('django.db.models.fields.PositiveIntegerField', [], {'db_index': 'True'}), - 'parent': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'children'", 'null': 'True', 'to': "orm['philo.Node']"}), - 'rght': ('django.db.models.fields.PositiveIntegerField', [], {'db_index': 'True'}), - 'slug': ('django.db.models.fields.SlugField', [], {'max_length': '255', 'db_index': 'True'}), - 'tree_id': ('django.db.models.fields.PositiveIntegerField', [], {'db_index': 'True'}), - 'view_content_type': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'node_view_set'", 'to': "orm['contenttypes.ContentType']"}), - 'view_object_id': ('django.db.models.fields.PositiveIntegerField', [], {}) - }, - 'philo.page': { - 'Meta': {'object_name': 'Page'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'template': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'pages'", 'to': "orm['philo.Template']"}), - 'title': ('django.db.models.fields.CharField', [], {'max_length': '255'}) - }, - 'philo.tag': { - 'Meta': {'object_name': 'Tag'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '255'}), - 'slug': ('django.db.models.fields.SlugField', [], {'unique': 'True', 'max_length': '255', 'db_index': 'True'}) - }, - 'philo.template': { - 'Meta': {'object_name': 'Template'}, - 'code': ('philo.models.fields.TemplateField', [], {}), - 'documentation': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'level': ('django.db.models.fields.PositiveIntegerField', [], {'db_index': 'True'}), - 'lft': ('django.db.models.fields.PositiveIntegerField', [], {'db_index': 'True'}), - 'mimetype': ('django.db.models.fields.CharField', [], {'default': "'text/html'", 'max_length': '255'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '255'}), - 'parent': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'children'", 'null': 'True', 'to': "orm['philo.Template']"}), - 'rght': ('django.db.models.fields.PositiveIntegerField', [], {'db_index': 'True'}), - 'slug': ('django.db.models.fields.SlugField', [], {'max_length': '255', 'db_index': 'True'}), - 'tree_id': ('django.db.models.fields.PositiveIntegerField', [], {'db_index': 'True'}) - } - } - - complete_apps = ['julian'] diff --git a/contrib/julian/migrations/0006_auto__add_field_calendarview_events_per_page__chg_field_calendarview_t.py b/contrib/julian/migrations/0006_auto__add_field_calendarview_events_per_page__chg_field_calendarview_t.py deleted file mode 100644 index b561219..0000000 --- a/contrib/julian/migrations/0006_auto__add_field_calendarview_events_per_page__chg_field_calendarview_t.py +++ /dev/null @@ -1,188 +0,0 @@ -# encoding: utf-8 -import 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 'CalendarView.events_per_page' - db.add_column('julian_calendarview', 'events_per_page', self.gf('django.db.models.fields.PositiveIntegerField')(null=True, blank=True), keep_default=False) - - # Changing field 'CalendarView.timespan_page' - db.alter_column('julian_calendarview', 'timespan_page_id', self.gf('django.db.models.fields.related.ForeignKey')(blank=True, null=True, to=orm['philo.Page'])) - - # Changing field 'CalendarView.owner_page' - db.alter_column('julian_calendarview', 'owner_page_id', self.gf('django.db.models.fields.related.ForeignKey')(blank=True, null=True, to=orm['philo.Page'])) - - # Changing field 'CalendarView.location_page' - db.alter_column('julian_calendarview', 'location_page_id', self.gf('django.db.models.fields.related.ForeignKey')(blank=True, null=True, to=orm['philo.Page'])) - - # Changing field 'CalendarView.tag_page' - db.alter_column('julian_calendarview', 'tag_page_id', self.gf('django.db.models.fields.related.ForeignKey')(blank=True, null=True, to=orm['philo.Page'])) - - - def backwards(self, orm): - - # Deleting field 'CalendarView.events_per_page' - db.delete_column('julian_calendarview', 'events_per_page') - - # Changing field 'CalendarView.timespan_page' - db.alter_column('julian_calendarview', 'timespan_page_id', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['philo.Page'])) - - # Changing field 'CalendarView.owner_page' - db.alter_column('julian_calendarview', 'owner_page_id', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['philo.Page'])) - - # Changing field 'CalendarView.location_page' - db.alter_column('julian_calendarview', 'location_page_id', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['philo.Page'])) - - # Changing field 'CalendarView.tag_page' - db.alter_column('julian_calendarview', 'tag_page_id', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['philo.Page'])) - - - models = { - 'auth.group': { - 'Meta': {'object_name': 'Group'}, - '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': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}) - }, - 'auth.permission': { - 'Meta': {'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'}, - 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) - }, - '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', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True', 'blank': 'True'}), - 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'blank': 'True'}), - 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'blank': 'True'}), - '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', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}), - 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) - }, - 'contenttypes.contenttype': { - 'Meta': {'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"}, - 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - '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'}) - }, - 'julian.calendar': { - 'Meta': {'object_name': 'Calendar'}, - 'description': ('django.db.models.fields.TextField', [], {'blank': 'True'}), - 'events': ('django.db.models.fields.related.ManyToManyField', [], {'related_name': "'calendars'", 'symmetrical': 'False', 'to': "orm['julian.Event']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'slug': ('django.db.models.fields.SlugField', [], {'max_length': '100', 'db_index': 'True'}), - 'uuid': ('django.db.models.fields.TextField', [], {'unique': 'True'}) - }, - 'julian.calendarview': { - 'Meta': {'object_name': 'CalendarView'}, - 'calendar': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['julian.Calendar']"}), - 'event_detail_page': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'calendar_detail_related'", 'to': "orm['philo.Page']"}), - 'events_per_page': ('django.db.models.fields.PositiveIntegerField', [], {'null': 'True', 'blank': 'True'}), - 'feed_suffix': ('django.db.models.fields.CharField', [], {'default': "'feed'", 'max_length': '255'}), - 'feed_type': ('django.db.models.fields.CharField', [], {'default': "'text/calendar'", 'max_length': '50'}), - 'feeds_enabled': ('django.db.models.fields.BooleanField', [], {'default': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'index_page': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'calendar_index_related'", 'to': "orm['philo.Page']"}), - 'item_description_template': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'julian_calendarview_description_related'", 'null': 'True', 'to': "orm['philo.Template']"}), - 'item_title_template': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'julian_calendarview_title_related'", 'null': 'True', 'to': "orm['philo.Template']"}), - 'location_archive_page': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'calendar_location_archive_related'", 'null': 'True', 'to': "orm['philo.Page']"}), - 'location_page': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'calendar_location_related'", 'null': 'True', 'to': "orm['philo.Page']"}), - 'location_permalink_base': ('django.db.models.fields.CharField', [], {'default': "'location'", 'max_length': '30'}), - 'owner_archive_page': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'calendar_owner_archive_related'", 'null': 'True', 'to': "orm['philo.Page']"}), - 'owner_page': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'calendar_owner_related'", 'null': 'True', 'to': "orm['philo.Page']"}), - 'owner_permalink_base': ('django.db.models.fields.CharField', [], {'default': "'owner'", 'max_length': '30'}), - 'tag_archive_page': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'calendar_tag_archive_related'", 'null': 'True', 'to': "orm['philo.Page']"}), - 'tag_page': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'calendar_tag_related'", 'null': 'True', 'to': "orm['philo.Page']"}), - 'tag_permalink_base': ('django.db.models.fields.CharField', [], {'default': "'tags'", 'max_length': '30'}), - 'timespan_page': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'calendar_timespan_related'", 'null': 'True', 'to': "orm['philo.Page']"}) - }, - 'julian.event': { - 'Meta': {'object_name': 'Event'}, - 'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'description': ('philo.models.fields.TemplateField', [], {}), - 'end_date': ('django.db.models.fields.DateField', [], {}), - 'end_time': ('django.db.models.fields.TimeField', [], {'null': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'last_modified': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}), - 'location_content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']", 'null': 'True', 'blank': 'True'}), - 'location_pk': ('django.db.models.fields.TextField', [], {'blank': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '255'}), - 'owner': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}), - 'parent_event': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['julian.Event']", 'null': 'True', 'blank': 'True'}), - 'slug': ('django.db.models.fields.SlugField', [], {'max_length': '255', 'db_index': 'True'}), - 'start_date': ('django.db.models.fields.DateField', [], {}), - 'start_time': ('django.db.models.fields.TimeField', [], {'null': 'True', 'blank': 'True'}), - 'tags': ('django.db.models.fields.related.ManyToManyField', [], {'blank': 'True', 'related_name': "'events'", 'null': 'True', 'symmetrical': 'False', 'to': "orm['philo.Tag']"}), - 'uuid': ('django.db.models.fields.TextField', [], {}) - }, - 'julian.location': { - 'Meta': {'object_name': 'Location'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '255'}), - 'slug': ('django.db.models.fields.SlugField', [], {'unique': 'True', 'max_length': '255', 'db_index': 'True'}) - }, - 'philo.attribute': { - 'Meta': {'unique_together': "(('key', 'entity_content_type', 'entity_object_id'), ('value_content_type', 'value_object_id'))", 'object_name': 'Attribute'}, - 'entity_content_type': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'attribute_entity_set'", 'to': "orm['contenttypes.ContentType']"}), - 'entity_object_id': ('django.db.models.fields.PositiveIntegerField', [], {'db_index': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'key': ('django.db.models.fields.CharField', [], {'max_length': '255', 'db_index': 'True'}), - 'value_content_type': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'attribute_value_set'", 'null': 'True', 'to': "orm['contenttypes.ContentType']"}), - 'value_object_id': ('django.db.models.fields.PositiveIntegerField', [], {'db_index': 'True', 'null': 'True', 'blank': 'True'}) - }, - 'philo.node': { - 'Meta': {'object_name': 'Node'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'level': ('django.db.models.fields.PositiveIntegerField', [], {'db_index': 'True'}), - 'lft': ('django.db.models.fields.PositiveIntegerField', [], {'db_index': 'True'}), - 'parent': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'children'", 'null': 'True', 'to': "orm['philo.Node']"}), - 'rght': ('django.db.models.fields.PositiveIntegerField', [], {'db_index': 'True'}), - 'slug': ('django.db.models.fields.SlugField', [], {'max_length': '255', 'db_index': 'True'}), - 'tree_id': ('django.db.models.fields.PositiveIntegerField', [], {'db_index': 'True'}), - 'view_content_type': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'node_view_set'", 'to': "orm['contenttypes.ContentType']"}), - 'view_object_id': ('django.db.models.fields.PositiveIntegerField', [], {}) - }, - 'philo.page': { - 'Meta': {'object_name': 'Page'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'template': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'pages'", 'to': "orm['philo.Template']"}), - 'title': ('django.db.models.fields.CharField', [], {'max_length': '255'}) - }, - 'philo.tag': { - 'Meta': {'object_name': 'Tag'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '255'}), - 'slug': ('django.db.models.fields.SlugField', [], {'unique': 'True', 'max_length': '255', 'db_index': 'True'}) - }, - 'philo.template': { - 'Meta': {'object_name': 'Template'}, - 'code': ('philo.models.fields.TemplateField', [], {}), - 'documentation': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'level': ('django.db.models.fields.PositiveIntegerField', [], {'db_index': 'True'}), - 'lft': ('django.db.models.fields.PositiveIntegerField', [], {'db_index': 'True'}), - 'mimetype': ('django.db.models.fields.CharField', [], {'default': "'text/html'", 'max_length': '255'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '255'}), - 'parent': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'children'", 'null': 'True', 'to': "orm['philo.Template']"}), - 'rght': ('django.db.models.fields.PositiveIntegerField', [], {'db_index': 'True'}), - 'slug': ('django.db.models.fields.SlugField', [], {'max_length': '255', 'db_index': 'True'}), - 'tree_id': ('django.db.models.fields.PositiveIntegerField', [], {'db_index': 'True'}) - } - } - - complete_apps = ['julian'] diff --git a/contrib/julian/models.py b/contrib/julian/models.py index 333bcb3..0653363 100644 --- a/contrib/julian/models.py +++ b/contrib/julian/models.py @@ -3,6 +3,7 @@ from django.conf.urls.defaults import url, patterns, include from django.contrib.auth.models import User from django.contrib.contenttypes.generic import GenericForeignKey from django.contrib.contenttypes.models import ContentType +from django.contrib.sites.models import Site from django.core.exceptions import ValidationError, ObjectDoesNotExist from django.core.validators import RegexValidator from django.db import models @@ -14,16 +15,29 @@ from philo.contrib.penfield.models import FeedView, FEEDS from philo.exceptions import ViewCanNotProvideSubpath from philo.models import Tag, Entity, Page, TemplateField from philo.utils import ContentTypeRegistryLimiter -import re, datetime, calendar +import datetime, calendar -# TODO: Could this regex more closely match the Formal Public Identifier spec? -# http://xml.coverpages.org/tauber-fpi.html -FPI_REGEX = re.compile(r"(|\+//|-//)[^/]+//[^/]+//[A-Z]{2}") +__all__ = ('register_location_model', 'unregister_location_model', 'Location', 'TimedModel', 'Event', 'Calendar', 'CalendarView',) ICALENDAR = ICalendarFeed.mime_type FEEDS[ICALENDAR] = ICalendarFeed +try: + DEFAULT_SITE = Site.objects.get_current() +except: + DEFAULT_SITE = None +_languages = dict(settings.LANGUAGES) +try: + _languages[settings.LANGUAGE_CODE] + DEFAULT_LANGUAGE = settings.LANGUAGE_CODE +except KeyError: + try: + lang = settings.LANGUAGE_CODE.split('-')[0] + _languages[lang] + DEFAULT_LANGUAGE = lang + except KeyError: + DEFAULT_LANGUAGE = None location_content_type_limiter = ContentTypeRegistryLimiter() @@ -119,13 +133,16 @@ class Calendar(Entity): name = models.CharField(max_length=100) slug = models.SlugField(max_length=100) description = models.TextField(blank=True) - events = models.ManyToManyField(Event, related_name='calendars') + events = models.ManyToManyField(Event, related_name='calendars', blank=True) - # TODO: Can we auto-generate this on save based on site id and calendar name and settings language? - uuid = models.TextField("Calendar UUID", unique=True, help_text="Should conform to Formal Public Identifier format. See Wikipedia.", validators=[RegexValidator(FPI_REGEX)]) + site = models.ForeignKey(Site, default=DEFAULT_SITE) + language = models.CharField(max_length=5, choices=settings.LANGUAGES, default=DEFAULT_LANGUAGE) def __unicode__(self): return self.name + + class Meta: + unique_together = ('name', 'site', 'language') class CalendarView(FeedView): @@ -382,7 +399,8 @@ class CalendarView(FeedView): def feed_guid(self, obj): # Is this correct? Should I have a different id for different subfeeds? - return obj.uuid + # See http://xml.coverpages.org/tauber-fpi.html for format. + return "-//%s//%s %s//%s" % (obj.site.name.upper(), self.feed_type.upper(), obj.name.upper(), obj.language.upper()) def description(self, obj): return obj.description