From 41711819e6a7ceb06b99ea3a5f24e8c171a1ffbc Mon Sep 17 00:00:00 2001 From: Daniel Levy Date: Thu, 2 Apr 2015 10:38:45 +0100 Subject: [PATCH 1/5] Switch from south to django migrations --- .../publicweb/migrations/0001_initial.py | 144 ++++++++------ .../migrations/0002_auto_20150312_1203.py | 20 ++ .../0002_auto__add_field_decision_status.py | 45 ----- .../0003_auto__del_concern__add_feedback.py | 67 ------- .../0004_auto__add_field_feedback_likert.py | 48 ----- ...dback_likert__add_field_feedback_rating.py | 54 ------ .../publicweb/migrations/0006_auto.py | 90 --------- .../publicweb/migrations/0007_auto.py | 101 ---------- .../0008_auto_del_watchers_add_subscribers.py | 101 ---------- .../0009_auto__add_field_decision_author.py | 86 --------- .../0010_auto__chg_field_decision_author.py | 86 --------- ...name__add_field_feedback_description_ex.py | 104 ----------- .../0012_auto__add_field_decision_tags.py | 87 --------- .../0013_auto__chg_field_decision_tags.py | 87 --------- .../0014_auto__add_field_decision_deadline.py | 110 ----------- ...ption_excerpt__add_field_feedback_excer.py | 106 ----------- ...t__chg_field_feedback_description__chg_.py | 98 ---------- ...7_auto__add_field_decision_created_date.py | 87 --------- ...8_auto__chg_field_decision_created_date.py | 87 --------- ..._auto__add_field_decision_archived_date.py | 88 --------- .../0020_auto__add_field_feedback_author.py | 88 --------- .../0021_auto__chg_field_feedback_rating.py | 88 --------- .../0022_auto__chg_field_decision_status.py | 88 --------- .../migrations/0023_status_int_to_char.py | 103 ---------- ...eting_people__chg_field_decision_people.py | 95 ---------- .../0025_auto__add_field_decision_editor.py | 91 --------- ..._auto__add_field_decision_last_modified.py | 92 --------- ...eated_date__add_field_decision_creation.py | 100 ---------- ...28_auto__add_field_decision_last_status.py | 93 --------- .../0029_auto__remove_m2m_table_watchers.py | 95 ---------- ...0_auto__add_field_decision_organization.py | 130 ------------- .../0031_auto__add_field_feedback_editor.py | 131 ------------- .../migrations/0032_make_all_users_editors.py | 150 --------------- .../0033_auto__add_field_actionitem_origin.py | 138 -------------- ..._add_unique_notificationsettings_user_o.py | 176 ------------------ .../0035_auto__add_organizationsettings.py | 169 ----------------- django/econsensus/publicweb/models.py | 12 +- 37 files changed, 108 insertions(+), 3427 deletions(-) create mode 100644 django/econsensus/publicweb/migrations/0002_auto_20150312_1203.py delete mode 100644 django/econsensus/publicweb/migrations/0002_auto__add_field_decision_status.py delete mode 100644 django/econsensus/publicweb/migrations/0003_auto__del_concern__add_feedback.py delete mode 100644 django/econsensus/publicweb/migrations/0004_auto__add_field_feedback_likert.py delete mode 100644 django/econsensus/publicweb/migrations/0005_auto__del_field_feedback_likert__add_field_feedback_rating.py delete mode 100644 django/econsensus/publicweb/migrations/0006_auto.py delete mode 100644 django/econsensus/publicweb/migrations/0007_auto.py delete mode 100644 django/econsensus/publicweb/migrations/0008_auto_del_watchers_add_subscribers.py delete mode 100644 django/econsensus/publicweb/migrations/0009_auto__add_field_decision_author.py delete mode 100644 django/econsensus/publicweb/migrations/0010_auto__chg_field_decision_author.py delete mode 100644 django/econsensus/publicweb/migrations/0011_auto__del_field_feedback_short_name__add_field_feedback_description_ex.py delete mode 100644 django/econsensus/publicweb/migrations/0012_auto__add_field_decision_tags.py delete mode 100644 django/econsensus/publicweb/migrations/0013_auto__chg_field_decision_tags.py delete mode 100644 django/econsensus/publicweb/migrations/0014_auto__add_field_decision_deadline.py delete mode 100644 django/econsensus/publicweb/migrations/0015_auto__del_field_feedback_description_excerpt__add_field_feedback_excer.py delete mode 100644 django/econsensus/publicweb/migrations/0016_auto__del_field_feedback_excerpt__chg_field_feedback_description__chg_.py delete mode 100644 django/econsensus/publicweb/migrations/0017_auto__add_field_decision_created_date.py delete mode 100644 django/econsensus/publicweb/migrations/0018_auto__chg_field_decision_created_date.py delete mode 100644 django/econsensus/publicweb/migrations/0019_auto__add_field_decision_archived_date.py delete mode 100644 django/econsensus/publicweb/migrations/0020_auto__add_field_feedback_author.py delete mode 100644 django/econsensus/publicweb/migrations/0021_auto__chg_field_feedback_rating.py delete mode 100644 django/econsensus/publicweb/migrations/0022_auto__chg_field_decision_status.py delete mode 100644 django/econsensus/publicweb/migrations/0023_status_int_to_char.py delete mode 100644 django/econsensus/publicweb/migrations/0024_auto__add_field_decision_meeting_people__chg_field_decision_people.py delete mode 100644 django/econsensus/publicweb/migrations/0025_auto__add_field_decision_editor.py delete mode 100644 django/econsensus/publicweb/migrations/0026_auto__add_field_decision_last_modified.py delete mode 100644 django/econsensus/publicweb/migrations/0027_auto__del_field_decision_created_date__add_field_decision_creation.py delete mode 100644 django/econsensus/publicweb/migrations/0028_auto__add_field_decision_last_status.py delete mode 100644 django/econsensus/publicweb/migrations/0029_auto__remove_m2m_table_watchers.py delete mode 100644 django/econsensus/publicweb/migrations/0030_auto__add_field_decision_organization.py delete mode 100644 django/econsensus/publicweb/migrations/0031_auto__add_field_feedback_editor.py delete mode 100644 django/econsensus/publicweb/migrations/0032_make_all_users_editors.py delete mode 100644 django/econsensus/publicweb/migrations/0033_auto__add_field_actionitem_origin.py delete mode 100644 django/econsensus/publicweb/migrations/0034_auto__add_notificationsettings__add_unique_notificationsettings_user_o.py delete mode 100644 django/econsensus/publicweb/migrations/0035_auto__add_organizationsettings.py diff --git a/django/econsensus/publicweb/migrations/0001_initial.py b/django/econsensus/publicweb/migrations/0001_initial.py index 5e675f54..89504a5e 100644 --- a/django/econsensus/publicweb/migrations/0001_initial.py +++ b/django/econsensus/publicweb/migrations/0001_initial.py @@ -1,67 +1,87 @@ -#@PydevCodeAnalysisIgnore -# encoding: utf-8 -from south.db import db -from south.v2 import SchemaMigration +# -*- coding: utf-8 -*- +from __future__ import unicode_literals -class Migration(SchemaMigration): +from django.db import models, migrations +from django.conf import settings +import tagging.fields - def forwards(self, orm): - - # Adding model 'Decision' - db.create_table('publicweb_decision', ( - ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), - ('short_name', self.gf('django.db.models.fields.CharField')(max_length=255)), - ('decided_date', self.gf('django.db.models.fields.DateField')(null=True, blank=True)), - ('effective_date', self.gf('django.db.models.fields.DateField')(null=True, blank=True)), - ('review_date', self.gf('django.db.models.fields.DateField')(null=True, blank=True)), - ('expiry_date', self.gf('django.db.models.fields.DateField')(null=True, blank=True)), - ('budget', self.gf('django.db.models.fields.CharField')(max_length=255, blank=True)), - ('people', self.gf('django.db.models.fields.CharField')(max_length=255, blank=True)), - ('description', self.gf('tinymce.models.HTMLField')(blank=True)), - )) - db.send_create_signal('publicweb', ['Decision']) - # Adding model 'Concern' - db.create_table('publicweb_concern', ( - ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), - ('short_name', self.gf('django.db.models.fields.CharField')(max_length=255)), - ('decision', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['publicweb.Decision'])), - ('description', self.gf('tinymce.models.HTMLField')(blank=True)), - ('resolved', self.gf('django.db.models.fields.BooleanField')(default=False)), - )) - db.send_create_signal('publicweb', ['Concern']) +class Migration(migrations.Migration): + dependencies = [ + migrations.swappable_dependency(settings.AUTH_USER_MODEL), + ('organizations', '__first__'), + ] - def backwards(self, orm): - - # Deleting model 'Decision' - db.delete_table('publicweb_decision') - - # Deleting model 'Concern' - db.delete_table('publicweb_concern') - - - models = { - 'publicweb.concern': { - 'Meta': {'object_name': 'Concern'}, - 'decision': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['publicweb.Decision']"}), - 'description': ('tinymce.models.HTMLField', [], {'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'resolved': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'short_name': ('django.db.models.fields.CharField', [], {'max_length': '255'}) - }, - 'publicweb.decision': { - 'Meta': {'object_name': 'Decision'}, - 'budget': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}), - 'decided_date': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), - 'description': ('tinymce.models.HTMLField', [], {'blank': 'True'}), - 'effective_date': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), - 'expiry_date': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'people': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}), - 'review_date': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), - 'short_name': ('django.db.models.fields.CharField', [], {'max_length': '255'}) - } - } - - complete_apps = ['publicweb'] + operations = [ + migrations.CreateModel( + name='Decision', + fields=[ + ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), + ('description', models.TextField(verbose_name='Description')), + ('decided_date', models.DateField(null=True, verbose_name='Decided Date', blank=True)), + ('effective_date', models.DateField(null=True, verbose_name='Effective Date', blank=True)), + ('review_date', models.DateField(null=True, verbose_name='Review Date', blank=True)), + ('expiry_date', models.DateField(null=True, verbose_name='Expiry Date', blank=True)), + ('deadline', models.DateField(null=True, verbose_name='Deadline', blank=True)), + ('archived_date', models.DateField(null=True, verbose_name='Archived Date', blank=True)), + ('budget', models.CharField(max_length=255, verbose_name='Budget/Resources', blank=True)), + ('people', models.CharField(max_length=255, null=True, blank=True)), + ('meeting_people', models.CharField(max_length=255, null=True, blank=True)), + ('status', models.CharField(default=b'proposal', max_length=10, choices=[(b'discussion', 'discussion'), (b'proposal', 'proposal'), (b'decision', 'decision'), (b'archived', 'archived')])), + ('tags', tagging.fields.TagField(help_text=b'Enter a list of tags separated by spaces.', max_length=255, null=True, blank=True)), + ('last_modified', models.DateTimeField(auto_now_add=True, verbose_name='Last Modified', null=True)), + ('last_status', models.CharField(default=b'new', max_length=10, editable=False, choices=[(b'discussion', 'discussion'), (b'proposal', 'proposal'), (b'decision', 'decision'), (b'archived', 'archived')])), + ('excerpt', models.CharField(max_length=255, verbose_name='Excerpt', blank=True)), + ('creation', models.DateField(auto_now_add=True, verbose_name='Creation', null=True)), + ('author', models.ForeignKey(related_name='publicweb_decision_authored', blank=True, editable=False, to=settings.AUTH_USER_MODEL, null=True)), + ('editor', models.ForeignKey(related_name='publicweb_decision_edited', blank=True, editable=False, to=settings.AUTH_USER_MODEL, null=True)), + ('organization', models.ForeignKey(to='organizations.Organization')), + ], + options={ + }, + bases=(models.Model,), + ), + migrations.CreateModel( + name='Feedback', + fields=[ + ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), + ('description', models.TextField(null=True, verbose_name='Description', blank=True)), + ('resolved', models.BooleanField(verbose_name='Resolved')), + ('rating', models.IntegerField(default=4, choices=[(0, b'question'), (1, b'danger'), (2, b'concerns'), (3, b'consent'), (4, b'comment')])), + ('author', models.ForeignKey(related_name='publicweb_feedback_related', blank=True, editable=False, to=settings.AUTH_USER_MODEL, null=True)), + ('decision', models.ForeignKey(verbose_name='Decision', to='publicweb.Decision')), + ('editor', models.ForeignKey(related_name='publicweb_feedback_edited', blank=True, editable=False, to=settings.AUTH_USER_MODEL, null=True)), + ], + options={ + }, + bases=(models.Model,), + ), + migrations.CreateModel( + name='NotificationSettings', + fields=[ + ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), + ('notification_level', models.IntegerField(default=1, help_text='Levels are cumulative, so if, for example, you choose to get notifications of replies to feedback, you will get notifications of all changes to main items as well.', verbose_name='Notification level', choices=[(0, '1. Silent'), (1, '2. Major events'), (2, '3. Feedback and changes'), (3, '4. Full discussion'), (4, '5. Everything, even minor changes')])), + ('organization', models.ForeignKey(to='organizations.Organization')), + ('user', models.ForeignKey(to=settings.AUTH_USER_MODEL)), + ], + options={ + }, + bases=(models.Model,), + ), + migrations.CreateModel( + name='OrganizationSettings', + fields=[ + ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), + ('default_notification_level', models.IntegerField(help_text='Levels are cumulative, so if, for example, you choose to get notifications of replies to feedback, you will get notifications of all changes to main items as well.', choices=[(0, '1. Silent'), (1, '2. Major events'), (2, '3. Feedback and changes'), (3, '4. Full discussion'), (4, '5. Everything, even minor changes')])), + ('organization', models.OneToOneField(to='organizations.Organization')), + ], + options={ + }, + bases=(models.Model,), + ), + migrations.AlterUniqueTogether( + name='notificationsettings', + unique_together=set([('user', 'organization')]), + ), + ] diff --git a/django/econsensus/publicweb/migrations/0002_auto_20150312_1203.py b/django/econsensus/publicweb/migrations/0002_auto_20150312_1203.py new file mode 100644 index 00000000..d5ff27b5 --- /dev/null +++ b/django/econsensus/publicweb/migrations/0002_auto_20150312_1203.py @@ -0,0 +1,20 @@ +# -*- coding: utf-8 -*- +from __future__ import unicode_literals + +from django.db import models, migrations + + +class Migration(migrations.Migration): + + dependencies = [ + ('publicweb', '0001_initial'), + ] + + operations = [ + migrations.AlterField( + model_name='feedback', + name='resolved', + field=models.BooleanField(default=False, verbose_name='Resolved'), + preserve_default=True, + ), + ] diff --git a/django/econsensus/publicweb/migrations/0002_auto__add_field_decision_status.py b/django/econsensus/publicweb/migrations/0002_auto__add_field_decision_status.py deleted file mode 100644 index e35ffa20..00000000 --- a/django/econsensus/publicweb/migrations/0002_auto__add_field_decision_status.py +++ /dev/null @@ -1,45 +0,0 @@ -#@PydevCodeAnalysisIgnore -#pylint: disable-msg=W0613 -# encoding: utf-8 -from south.db import db -from south.v2 import SchemaMigration - -class Migration(SchemaMigration): - - def forwards(self, orm): - - # Adding field 'Decision.status' - db.add_column('publicweb_decision', 'status', self.gf('django.db.models.fields.IntegerField')(default=1), keep_default=False) - - - def backwards(self, orm): - - # Deleting field 'Decision.status' - db.delete_column('publicweb_decision', 'status') - - - models = { - 'publicweb.concern': { - 'Meta': {'object_name': 'Concern'}, - 'decision': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['publicweb.Decision']"}), - 'description': ('tinymce.models.HTMLField', [], {'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'resolved': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'short_name': ('django.db.models.fields.CharField', [], {'max_length': '255'}) - }, - 'publicweb.decision': { - 'Meta': {'object_name': 'Decision'}, - 'budget': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}), - 'decided_date': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), - 'description': ('tinymce.models.HTMLField', [], {'blank': 'True'}), - 'effective_date': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), - 'expiry_date': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'people': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}), - 'review_date': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), - 'short_name': ('django.db.models.fields.CharField', [], {'max_length': '255'}), - 'status': ('django.db.models.fields.IntegerField', [], {'default': '1'}) - } - } - - complete_apps = ['publicweb'] diff --git a/django/econsensus/publicweb/migrations/0003_auto__del_concern__add_feedback.py b/django/econsensus/publicweb/migrations/0003_auto__del_concern__add_feedback.py deleted file mode 100644 index 3c910da3..00000000 --- a/django/econsensus/publicweb/migrations/0003_auto__del_concern__add_feedback.py +++ /dev/null @@ -1,67 +0,0 @@ -#@PydevCodeAnalysisIgnore -#pylint: disable-msg=W0611 -# 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 'Concern' - db.delete_table('publicweb_concern') - - # Adding model 'Feedback' - db.create_table('publicweb_feedback', ( - ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), - ('short_name', self.gf('django.db.models.fields.CharField')(max_length=255)), - ('decision', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['publicweb.Decision'])), - ('description', self.gf('tinymce.models.HTMLField')(blank=True)), - ('resolved', self.gf('django.db.models.fields.BooleanField')(default=False)), - )) - db.send_create_signal('publicweb', ['Feedback']) - - - def backwards(self, orm): - - # Adding model 'Concern' - db.create_table('publicweb_concern', ( - ('resolved', self.gf('django.db.models.fields.BooleanField')(default=False)), - ('description', self.gf('tinymce.models.HTMLField')(blank=True)), - ('short_name', self.gf('django.db.models.fields.CharField')(max_length=255)), - ('decision', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['publicweb.Decision'])), - ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), - )) - db.send_create_signal('publicweb', ['Concern']) - - # Deleting model 'Feedback' - db.delete_table('publicweb_feedback') - - - models = { - 'publicweb.decision': { - 'Meta': {'object_name': 'Decision'}, - 'budget': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}), - 'decided_date': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), - 'description': ('tinymce.models.HTMLField', [], {'blank': 'True'}), - 'effective_date': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), - 'expiry_date': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'people': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}), - 'review_date': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), - 'short_name': ('django.db.models.fields.CharField', [], {'max_length': '255'}), - 'status': ('django.db.models.fields.IntegerField', [], {'default': '0'}) - }, - 'publicweb.feedback': { - 'Meta': {'object_name': 'Feedback'}, - 'decision': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['publicweb.Decision']"}), - 'description': ('tinymce.models.HTMLField', [], {'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'resolved': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'short_name': ('django.db.models.fields.CharField', [], {'max_length': '255'}) - } - } - - complete_apps = ['publicweb'] diff --git a/django/econsensus/publicweb/migrations/0004_auto__add_field_feedback_likert.py b/django/econsensus/publicweb/migrations/0004_auto__add_field_feedback_likert.py deleted file mode 100644 index 2661ba54..00000000 --- a/django/econsensus/publicweb/migrations/0004_auto__add_field_feedback_likert.py +++ /dev/null @@ -1,48 +0,0 @@ -#@PydevCodeAnalysisIgnore -#pylint: disable-msg=W0611 -# 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 'Feedback.likert' - db.add_column('publicweb_feedback', 'likert', self.gf('django.db.models.fields.IntegerField')(null=True, blank=True), keep_default=False) - - - def backwards(self, orm): - - # Deleting field 'Feedback.likert' - db.delete_column('publicweb_feedback', 'likert') - - - models = { - 'publicweb.decision': { - 'Meta': {'object_name': 'Decision'}, - 'budget': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}), - 'decided_date': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), - 'description': ('tinymce.models.HTMLField', [], {'blank': 'True'}), - 'effective_date': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), - 'expiry_date': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'people': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}), - 'review_date': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), - 'short_name': ('django.db.models.fields.CharField', [], {'max_length': '255'}), - 'status': ('django.db.models.fields.IntegerField', [], {'default': '0'}) - }, - 'publicweb.feedback': { - 'Meta': {'object_name': 'Feedback'}, - 'decision': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['publicweb.Decision']"}), - 'description': ('tinymce.models.HTMLField', [], {'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'likert': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}), - 'resolved': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'short_name': ('django.db.models.fields.CharField', [], {'max_length': '255'}) - } - } - - complete_apps = ['publicweb'] diff --git a/django/econsensus/publicweb/migrations/0005_auto__del_field_feedback_likert__add_field_feedback_rating.py b/django/econsensus/publicweb/migrations/0005_auto__del_field_feedback_likert__add_field_feedback_rating.py deleted file mode 100644 index ded09190..00000000 --- a/django/econsensus/publicweb/migrations/0005_auto__del_field_feedback_likert__add_field_feedback_rating.py +++ /dev/null @@ -1,54 +0,0 @@ -#@PydevCodeAnalysisIgnore -#pylint: disable-msg=W0611 -# 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 field 'Feedback.likert' - db.delete_column('publicweb_feedback', 'likert') - - # Adding field 'Feedback.rating' - db.add_column('publicweb_feedback', 'rating', self.gf('django.db.models.fields.IntegerField')(null=True, blank=True), keep_default=False) - - - def backwards(self, orm): - - # Adding field 'Feedback.likert' - db.add_column('publicweb_feedback', 'likert', self.gf('django.db.models.fields.IntegerField')(null=True, blank=True), keep_default=False) - - # Deleting field 'Feedback.rating' - db.delete_column('publicweb_feedback', 'rating') - - - models = { - 'publicweb.decision': { - 'Meta': {'object_name': 'Decision'}, - 'budget': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}), - 'decided_date': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), - 'description': ('tinymce.models.HTMLField', [], {'blank': 'True'}), - 'effective_date': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), - 'expiry_date': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'people': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}), - 'review_date': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), - 'short_name': ('django.db.models.fields.CharField', [], {'max_length': '255'}), - 'status': ('django.db.models.fields.IntegerField', [], {'default': '0'}) - }, - 'publicweb.feedback': { - 'Meta': {'object_name': 'Feedback'}, - 'decision': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['publicweb.Decision']"}), - 'description': ('tinymce.models.HTMLField', [], {'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'rating': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}), - 'resolved': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'short_name': ('django.db.models.fields.CharField', [], {'max_length': '255'}) - } - } - - complete_apps = ['publicweb'] diff --git a/django/econsensus/publicweb/migrations/0006_auto.py b/django/econsensus/publicweb/migrations/0006_auto.py deleted file mode 100644 index 92f3e9b6..00000000 --- a/django/econsensus/publicweb/migrations/0006_auto.py +++ /dev/null @@ -1,90 +0,0 @@ -#@PydevCodeAnalysisIgnore -#pylint: disable-msg=W0611 -# 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 M2M table for field watch_list on 'Decision' - db.create_table('publicweb_decision_watch_list', ( - ('id', models.AutoField(verbose_name='ID', primary_key=True, auto_created=True)), - ('decision', models.ForeignKey(orm['publicweb.decision'], null=False)), - ('user', models.ForeignKey(orm['auth.user'], null=False)) - )) - db.create_unique('publicweb_decision_watch_list', ['decision_id', 'user_id']) - - - def backwards(self, orm): - - # Removing M2M table for field watch_list on 'Decision' - db.delete_table('publicweb_decision_watch_list') - - - 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': {'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'}), - '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'}), - 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}), - 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}), - 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) - }, - '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'}), - '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'}) - }, - 'publicweb.decision': { - 'Meta': {'object_name': 'Decision'}, - 'budget': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}), - 'decided_date': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), - 'description': ('tinymce.models.HTMLField', [], {'blank': 'True'}), - 'effective_date': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), - 'expiry_date': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'people': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}), - 'review_date': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), - 'short_name': ('django.db.models.fields.CharField', [], {'max_length': '255'}), - 'status': ('django.db.models.fields.IntegerField', [], {'default': '0'}), - 'watch_list': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.User']", 'symmetrical': 'False'}) - }, - 'publicweb.feedback': { - 'Meta': {'object_name': 'Feedback'}, - 'decision': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['publicweb.Decision']"}), - 'description': ('tinymce.models.HTMLField', [], {'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'rating': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}), - 'resolved': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'short_name': ('django.db.models.fields.CharField', [], {'max_length': '255'}) - } - } - - complete_apps = ['publicweb'] diff --git a/django/econsensus/publicweb/migrations/0007_auto.py b/django/econsensus/publicweb/migrations/0007_auto.py deleted file mode 100644 index 2011dc04..00000000 --- a/django/econsensus/publicweb/migrations/0007_auto.py +++ /dev/null @@ -1,101 +0,0 @@ -#@PydevCodeAnalysisIgnore -#pylint: disable-msg=W0611 -# 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): - - # Removing M2M table for field watch_list on 'Decision' - db.delete_table('publicweb_decision_watch_list') - - # Adding M2M table for field watchers on 'Decision' - db.create_table('publicweb_decision_watchers', ( - ('id', models.AutoField(verbose_name='ID', primary_key=True, auto_created=True)), - ('decision', models.ForeignKey(orm['publicweb.decision'], null=False)), - ('user', models.ForeignKey(orm['auth.user'], null=False)) - )) - db.create_unique('publicweb_decision_watchers', ['decision_id', 'user_id']) - - - def backwards(self, orm): - - # Adding M2M table for field watch_list on 'Decision' - db.create_table('publicweb_decision_watch_list', ( - ('id', models.AutoField(verbose_name='ID', primary_key=True, auto_created=True)), - ('decision', models.ForeignKey(orm['publicweb.decision'], null=False)), - ('user', models.ForeignKey(orm['auth.user'], null=False)) - )) - db.create_unique('publicweb_decision_watch_list', ['decision_id', 'user_id']) - - # Removing M2M table for field watchers on 'Decision' - db.delete_table('publicweb_decision_watchers') - - - 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': {'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'}), - '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'}), - 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}), - 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}), - 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) - }, - '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'}), - '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'}) - }, - 'publicweb.decision': { - 'Meta': {'object_name': 'Decision'}, - 'budget': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}), - 'decided_date': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), - 'description': ('tinymce.models.HTMLField', [], {'blank': 'True'}), - 'effective_date': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), - 'expiry_date': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'people': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}), - 'review_date': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), - 'short_name': ('django.db.models.fields.CharField', [], {'max_length': '255'}), - 'status': ('django.db.models.fields.IntegerField', [], {'default': '0'}), - 'watchers': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.User']", 'symmetrical': 'False'}) - }, - 'publicweb.feedback': { - 'Meta': {'object_name': 'Feedback'}, - 'decision': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['publicweb.Decision']"}), - 'description': ('tinymce.models.HTMLField', [], {'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'rating': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}), - 'resolved': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'short_name': ('django.db.models.fields.CharField', [], {'max_length': '255'}) - } - } - - complete_apps = ['publicweb'] diff --git a/django/econsensus/publicweb/migrations/0008_auto_del_watchers_add_subscribers.py b/django/econsensus/publicweb/migrations/0008_auto_del_watchers_add_subscribers.py deleted file mode 100644 index 05107b57..00000000 --- a/django/econsensus/publicweb/migrations/0008_auto_del_watchers_add_subscribers.py +++ /dev/null @@ -1,101 +0,0 @@ -#@PydevCodeAnalysisIgnore -#pylint: disable-msg=W0611 -# 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): - - # Removing M2M table for field watchers on 'Decision' - db.delete_table('publicweb_decision_watchers') - - # Adding M2M table for field subscribers on 'Decision' - db.create_table('publicweb_decision_subscribers', ( - ('id', models.AutoField(verbose_name='ID', primary_key=True, auto_created=True)), - ('decision', models.ForeignKey(orm['publicweb.decision'], null=False)), - ('user', models.ForeignKey(orm['auth.user'], null=False)) - )) - db.create_unique('publicweb_decision_subscribers', ['decision_id', 'user_id']) - - - def backwards(self, orm): - - # Adding M2M table for field watchers on 'Decision' - db.create_table('publicweb_decision_watchers', ( - ('id', models.AutoField(verbose_name='ID', primary_key=True, auto_created=True)), - ('decision', models.ForeignKey(orm['publicweb.decision'], null=False)), - ('user', models.ForeignKey(orm['auth.user'], null=False)) - )) - db.create_unique('publicweb_decision_watchers', ['decision_id', 'user_id']) - - # Removing M2M table for field subscribers on 'Decision' - db.delete_table('publicweb_decision_subscribers') - - - 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': {'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'}), - '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'}), - 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}), - 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}), - 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) - }, - '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'}), - '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'}) - }, - 'publicweb.decision': { - 'Meta': {'object_name': 'Decision'}, - 'budget': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}), - 'decided_date': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), - 'description': ('tinymce.models.HTMLField', [], {'blank': 'True'}), - 'effective_date': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), - 'expiry_date': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'people': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}), - 'review_date': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), - 'short_name': ('django.db.models.fields.CharField', [], {'max_length': '255'}), - 'status': ('django.db.models.fields.IntegerField', [], {'default': '0'}), - 'subscribers': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.User']", 'symmetrical': 'False', 'blank': 'True'}) - }, - 'publicweb.feedback': { - 'Meta': {'object_name': 'Feedback'}, - 'decision': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['publicweb.Decision']"}), - 'description': ('tinymce.models.HTMLField', [], {'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'rating': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}), - 'resolved': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'short_name': ('django.db.models.fields.CharField', [], {'max_length': '255'}) - } - } - - complete_apps = ['publicweb'] diff --git a/django/econsensus/publicweb/migrations/0009_auto__add_field_decision_author.py b/django/econsensus/publicweb/migrations/0009_auto__add_field_decision_author.py deleted file mode 100644 index 6e2a98ec..00000000 --- a/django/econsensus/publicweb/migrations/0009_auto__add_field_decision_author.py +++ /dev/null @@ -1,86 +0,0 @@ -#@PydevCodeAnalysisIgnore -#pylint: disable-msg=W0611 -# 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 'Decision.author' - db.add_column('publicweb_decision', 'author', self.gf('django.db.models.fields.related.ForeignKey')(default=0, related_name='open_consent_author', blank=True, to=orm['auth.User']), keep_default=False) - - - def backwards(self, orm): - - # Deleting field 'Decision.author' - db.delete_column('publicweb_decision', 'author_id') - - - 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': {'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'}), - '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'}), - 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}), - 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}), - 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) - }, - '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'}), - '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'}) - }, - 'publicweb.decision': { - 'Meta': {'object_name': 'Decision'}, - 'author': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'open_consent_author'", 'blank': 'True', 'to': "orm['auth.User']"}), - 'budget': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}), - 'decided_date': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), - 'description': ('tinymce.models.HTMLField', [], {'blank': 'True'}), - 'effective_date': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), - 'expiry_date': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'people': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}), - 'review_date': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), - 'short_name': ('django.db.models.fields.CharField', [], {'max_length': '255'}), - 'status': ('django.db.models.fields.IntegerField', [], {'default': '0'}), - 'subscribers': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.User']", 'symmetrical': 'False', 'blank': 'True'}) - }, - 'publicweb.feedback': { - 'Meta': {'object_name': 'Feedback'}, - 'decision': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['publicweb.Decision']"}), - 'description': ('tinymce.models.HTMLField', [], {'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'rating': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}), - 'resolved': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'short_name': ('django.db.models.fields.CharField', [], {'max_length': '255'}) - } - } - - complete_apps = ['publicweb'] diff --git a/django/econsensus/publicweb/migrations/0010_auto__chg_field_decision_author.py b/django/econsensus/publicweb/migrations/0010_auto__chg_field_decision_author.py deleted file mode 100644 index 92cb6fb4..00000000 --- a/django/econsensus/publicweb/migrations/0010_auto__chg_field_decision_author.py +++ /dev/null @@ -1,86 +0,0 @@ -#@PydevCodeAnalysisIgnore -#pylint: disable-msg=W0611 -# 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 'Decision.author' - db.alter_column('publicweb_decision', 'author_id', self.gf('django.db.models.fields.related.ForeignKey')(null=True, to=orm['auth.User'])) - - - def backwards(self, orm): - - # Changing field 'Decision.author' - db.alter_column('publicweb_decision', 'author_id', self.gf('django.db.models.fields.related.ForeignKey')(default=1, to=orm['auth.User'])) - - - 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': {'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'}), - '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'}), - 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}), - 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}), - 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) - }, - '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'}), - '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'}) - }, - 'publicweb.decision': { - 'Meta': {'object_name': 'Decision'}, - 'author': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'open_consent_author'", 'null': 'True', 'to': "orm['auth.User']"}), - 'budget': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}), - 'decided_date': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), - 'description': ('tinymce.models.HTMLField', [], {'blank': 'True'}), - 'effective_date': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), - 'expiry_date': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'people': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}), - 'review_date': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), - 'short_name': ('django.db.models.fields.CharField', [], {'max_length': '255'}), - 'status': ('django.db.models.fields.IntegerField', [], {'default': '0'}), - 'subscribers': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.User']", 'symmetrical': 'False', 'blank': 'True'}) - }, - 'publicweb.feedback': { - 'Meta': {'object_name': 'Feedback'}, - 'decision': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['publicweb.Decision']"}), - 'description': ('tinymce.models.HTMLField', [], {'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'rating': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}), - 'resolved': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'short_name': ('django.db.models.fields.CharField', [], {'max_length': '255'}) - } - } - - complete_apps = ['publicweb'] diff --git a/django/econsensus/publicweb/migrations/0011_auto__del_field_feedback_short_name__add_field_feedback_description_ex.py b/django/econsensus/publicweb/migrations/0011_auto__del_field_feedback_short_name__add_field_feedback_description_ex.py deleted file mode 100644 index 12c1ab4d..00000000 --- a/django/econsensus/publicweb/migrations/0011_auto__del_field_feedback_short_name__add_field_feedback_description_ex.py +++ /dev/null @@ -1,104 +0,0 @@ -#@PydevCodeAnalysisIgnore -#pylint: disable-msg=W0611 -# 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 field 'Feedback.short_name' - db.delete_column('publicweb_feedback', 'short_name') - - # Adding field 'Feedback.description_excerpt' - db.add_column('publicweb_feedback', 'description_excerpt', self.gf('django.db.models.fields.CharField')(default='', max_length=255, blank=True), keep_default=False) - - # Deleting field 'Decision.short_name' - db.delete_column('publicweb_decision', 'short_name') - - # Adding field 'Decision.description_excerpt' - db.add_column('publicweb_decision', 'description_excerpt', self.gf('django.db.models.fields.CharField')(default='', max_length=255, blank=True), keep_default=False) - - - def backwards(self, orm): - - # Adding field 'Feedback.short_name' - db.add_column('publicweb_feedback', 'short_name', self.gf('django.db.models.fields.CharField')(default=' ', max_length=255), keep_default=False) - - # Deleting field 'Feedback.description_excerpt' - db.delete_column('publicweb_feedback', 'description_excerpt') - - # Adding field 'Decision.short_name' - db.add_column('publicweb_decision', 'short_name', self.gf('django.db.models.fields.CharField')(default=' ', max_length=255), keep_default=False) - - # Deleting field 'Decision.description_excerpt' - db.delete_column('publicweb_decision', 'description_excerpt') - - - 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': {'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'}), - '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'}), - 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}), - 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}), - 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) - }, - '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'}), - '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'}) - }, - 'publicweb.decision': { - 'Meta': {'object_name': 'Decision'}, - 'author': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'open_consent_author'", 'null': 'True', 'to': "orm['auth.User']"}), - 'budget': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}), - 'decided_date': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), - 'description': ('tinymce.models.HTMLField', [], {}), - 'description_excerpt': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}), - 'effective_date': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), - 'expiry_date': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'people': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}), - 'review_date': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), - 'status': ('django.db.models.fields.IntegerField', [], {'default': '0'}), - 'subscribers': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.User']", 'symmetrical': 'False', 'blank': 'True'}) - }, - 'publicweb.feedback': { - 'Meta': {'object_name': 'Feedback'}, - 'decision': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['publicweb.Decision']"}), - 'description': ('tinymce.models.HTMLField', [], {}), - 'description_excerpt': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'rating': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}), - 'resolved': ('django.db.models.fields.BooleanField', [], {'default': 'False'}) - } - } - - complete_apps = ['publicweb'] diff --git a/django/econsensus/publicweb/migrations/0012_auto__add_field_decision_tags.py b/django/econsensus/publicweb/migrations/0012_auto__add_field_decision_tags.py deleted file mode 100644 index ab370971..00000000 --- a/django/econsensus/publicweb/migrations/0012_auto__add_field_decision_tags.py +++ /dev/null @@ -1,87 +0,0 @@ -#@PydevCodeAnalysisIgnore -#pylint: disable-msg=W0611 -# 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 'Decision.tags' - db.add_column('publicweb_decision', 'tags', self.gf('tagging.fields.TagField')(default='', max_length=255, blank=True), keep_default=False) - - - def backwards(self, orm): - - # Deleting field 'Decision.tags' - db.delete_column('publicweb_decision', 'tags') - - - 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': {'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'}), - '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'}), - 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}), - 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}), - 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) - }, - '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'}), - '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'}) - }, - 'publicweb.decision': { - 'Meta': {'object_name': 'Decision'}, - 'author': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'open_consent_author'", 'null': 'True', 'to': "orm['auth.User']"}), - 'budget': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}), - 'decided_date': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), - 'description': ('tinymce.models.HTMLField', [], {}), - 'description_excerpt': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}), - 'effective_date': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), - 'expiry_date': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'people': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}), - 'review_date': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), - 'status': ('django.db.models.fields.IntegerField', [], {'default': '0'}), - 'subscribers': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.User']", 'symmetrical': 'False', 'blank': 'True'}), - 'tags': ('tagging.fields.TagField', [], {'max_length': '255', 'blank': 'True'}) - }, - 'publicweb.feedback': { - 'Meta': {'object_name': 'Feedback'}, - 'decision': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['publicweb.Decision']"}), - 'description': ('tinymce.models.HTMLField', [], {}), - 'description_excerpt': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'rating': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}), - 'resolved': ('django.db.models.fields.BooleanField', [], {'default': 'False'}) - } - } - - complete_apps = ['publicweb'] diff --git a/django/econsensus/publicweb/migrations/0013_auto__chg_field_decision_tags.py b/django/econsensus/publicweb/migrations/0013_auto__chg_field_decision_tags.py deleted file mode 100644 index fd8e73e9..00000000 --- a/django/econsensus/publicweb/migrations/0013_auto__chg_field_decision_tags.py +++ /dev/null @@ -1,87 +0,0 @@ -#@PydevCodeAnalysisIgnore -#pylint: disable-msg=W0611 -# 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 'Decision.tags' - db.alter_column('publicweb_decision', 'tags', self.gf('tagging.fields.TagField')(null=True)) - - - def backwards(self, orm): - - # Changing field 'Decision.tags' - db.alter_column('publicweb_decision', 'tags', self.gf('tagging.fields.TagField')(default='', max_length=255)) - - - 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': {'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'}), - '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'}), - 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}), - 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}), - 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) - }, - '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'}), - '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'}) - }, - 'publicweb.decision': { - 'Meta': {'object_name': 'Decision'}, - 'author': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'open_consent_author'", 'null': 'True', 'to': "orm['auth.User']"}), - 'budget': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}), - 'decided_date': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), - 'description': ('tinymce.models.HTMLField', [], {}), - 'description_excerpt': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}), - 'effective_date': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), - 'expiry_date': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'people': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}), - 'review_date': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), - 'status': ('django.db.models.fields.IntegerField', [], {'default': '0'}), - 'subscribers': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.User']", 'symmetrical': 'False', 'blank': 'True'}), - 'tags': ('tagging.fields.TagField', [], {'null': 'True'}) - }, - 'publicweb.feedback': { - 'Meta': {'object_name': 'Feedback'}, - 'decision': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['publicweb.Decision']"}), - 'description': ('tinymce.models.HTMLField', [], {}), - 'description_excerpt': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'rating': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}), - 'resolved': ('django.db.models.fields.BooleanField', [], {'default': 'False'}) - } - } - - complete_apps = ['publicweb'] diff --git a/django/econsensus/publicweb/migrations/0014_auto__add_field_decision_deadline.py b/django/econsensus/publicweb/migrations/0014_auto__add_field_decision_deadline.py deleted file mode 100644 index 235fb933..00000000 --- a/django/econsensus/publicweb/migrations/0014_auto__add_field_decision_deadline.py +++ /dev/null @@ -1,110 +0,0 @@ -#@PydevCodeAnalysisIgnore -#pylint: disable-msg=W0611 -# 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 'Decision.deadline' - db.add_column('publicweb_decision', 'deadline', self.gf('django.db.models.fields.DateField')(null=True, blank=True), keep_default=False) - - # Removing M2M table for field subscribers on 'Decision' - db.delete_table('publicweb_decision_subscribers') - - # Adding M2M table for field watchers on 'Decision' - db.create_table('publicweb_decision_watchers', ( - ('id', models.AutoField(verbose_name='ID', primary_key=True, auto_created=True)), - ('decision', models.ForeignKey(orm['publicweb.decision'], null=False)), - ('user', models.ForeignKey(orm['auth.user'], null=False)) - )) - db.create_unique('publicweb_decision_watchers', ['decision_id', 'user_id']) - - - def backwards(self, orm): - - # Deleting field 'Decision.deadline' - db.delete_column('publicweb_decision', 'deadline') - - # Adding M2M table for field subscribers on 'Decision' - db.create_table('publicweb_decision_subscribers', ( - ('id', models.AutoField(verbose_name='ID', primary_key=True, auto_created=True)), - ('decision', models.ForeignKey(orm['publicweb.decision'], null=False)), - ('user', models.ForeignKey(orm['auth.user'], null=False)) - )) - db.create_unique('publicweb_decision_subscribers', ['decision_id', 'user_id']) - - # Removing M2M table for field watchers on 'Decision' - db.delete_table('publicweb_decision_watchers') - - - 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': {'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'}), - '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'}), - 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}), - 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}), - 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) - }, - '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'}), - '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'}) - }, - 'publicweb.decision': { - 'Meta': {'object_name': 'Decision'}, - 'author': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'open_consent_author'", 'null': 'True', 'to': "orm['auth.User']"}), - 'budget': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}), - 'deadline': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), - 'decided_date': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), - 'description': ('tinymce.models.HTMLField', [], {}), - 'description_excerpt': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}), - 'effective_date': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), - 'expiry_date': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'people': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}), - 'review_date': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), - 'status': ('django.db.models.fields.IntegerField', [], {'default': '0'}), - 'tags': ('tagging.fields.TagField', [], {'null': 'True'}), - 'watchers': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.User']", 'symmetrical': 'False', 'blank': 'True'}) - }, - 'publicweb.feedback': { - 'Meta': {'object_name': 'Feedback'}, - 'decision': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['publicweb.Decision']"}), - 'description': ('tinymce.models.HTMLField', [], {}), - 'description_excerpt': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'rating': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}), - 'resolved': ('django.db.models.fields.BooleanField', [], {'default': 'False'}) - } - } - - complete_apps = ['publicweb'] diff --git a/django/econsensus/publicweb/migrations/0015_auto__del_field_feedback_description_excerpt__add_field_feedback_excer.py b/django/econsensus/publicweb/migrations/0015_auto__del_field_feedback_description_excerpt__add_field_feedback_excer.py deleted file mode 100644 index fc5e67eb..00000000 --- a/django/econsensus/publicweb/migrations/0015_auto__del_field_feedback_description_excerpt__add_field_feedback_excer.py +++ /dev/null @@ -1,106 +0,0 @@ -#@PydevCodeAnalysisIgnore -#pylint: disable-msg=W0611 -# 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 field 'Feedback.description_excerpt' - db.delete_column('publicweb_feedback', 'description_excerpt') - - # Adding field 'Feedback.excerpt' - db.add_column('publicweb_feedback', 'excerpt', self.gf('django.db.models.fields.CharField')(default='', max_length=255, blank=True), keep_default=False) - - # Deleting field 'Decision.description_excerpt' - db.delete_column('publicweb_decision', 'description_excerpt') - - # Adding field 'Decision.excerpt' - db.add_column('publicweb_decision', 'excerpt', self.gf('django.db.models.fields.CharField')(default='', max_length=255, blank=True), keep_default=False) - - - def backwards(self, orm): - - # Adding field 'Feedback.description_excerpt' - db.add_column('publicweb_feedback', 'description_excerpt', self.gf('django.db.models.fields.CharField')(default='', max_length=255, blank=True), keep_default=False) - - # Deleting field 'Feedback.excerpt' - db.delete_column('publicweb_feedback', 'excerpt') - - # Adding field 'Decision.description_excerpt' - db.add_column('publicweb_decision', 'description_excerpt', self.gf('django.db.models.fields.CharField')(default='', max_length=255, blank=True), keep_default=False) - - # Deleting field 'Decision.excerpt' - db.delete_column('publicweb_decision', 'excerpt') - - - 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': {'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'}), - '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'}), - 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}), - 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}), - 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) - }, - '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'}), - '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'}) - }, - 'publicweb.decision': { - 'Meta': {'object_name': 'Decision'}, - 'author': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'open_consent_author'", 'null': 'True', 'to': "orm['auth.User']"}), - 'budget': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}), - 'deadline': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), - 'decided_date': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), - 'description': ('tinymce.models.HTMLField', [], {}), - 'effective_date': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), - 'excerpt': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}), - 'expiry_date': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'people': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}), - 'review_date': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), - 'status': ('django.db.models.fields.IntegerField', [], {'default': '0'}), - 'tags': ('tagging.fields.TagField', [], {'null': 'True'}), - 'watchers': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.User']", 'symmetrical': 'False', 'blank': 'True'}) - }, - 'publicweb.feedback': { - 'Meta': {'object_name': 'Feedback'}, - 'decision': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['publicweb.Decision']"}), - 'description': ('tinymce.models.HTMLField', [], {}), - 'excerpt': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'rating': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}), - 'resolved': ('django.db.models.fields.BooleanField', [], {'default': 'False'}) - } - } - - complete_apps = ['publicweb'] diff --git a/django/econsensus/publicweb/migrations/0016_auto__del_field_feedback_excerpt__chg_field_feedback_description__chg_.py b/django/econsensus/publicweb/migrations/0016_auto__del_field_feedback_excerpt__chg_field_feedback_description__chg_.py deleted file mode 100644 index 7362c89f..00000000 --- a/django/econsensus/publicweb/migrations/0016_auto__del_field_feedback_excerpt__chg_field_feedback_description__chg_.py +++ /dev/null @@ -1,98 +0,0 @@ -#@PydevCodeAnalysisIgnore -# 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 field 'Feedback.excerpt' - db.delete_column('publicweb_feedback', 'excerpt') - - # Changing field 'Feedback.description' - db.alter_column('publicweb_feedback', 'description', self.gf('django.db.models.fields.TextField')(null=True)) - - # Changing field 'Decision.description' - db.alter_column('publicweb_decision', 'description', self.gf('django.db.models.fields.TextField')()) - - - def backwards(self, orm): - - # Adding field 'Feedback.excerpt' - db.add_column('publicweb_feedback', 'excerpt', self.gf('django.db.models.fields.CharField')(default='', max_length=255, blank=True), keep_default=False) - - # Changing field 'Feedback.description' - db.alter_column('publicweb_feedback', 'description', self.gf('tinymce.models.HTMLField')(default='generic description')) - - # Changing field 'Decision.description' - db.alter_column('publicweb_decision', 'description', self.gf('tinymce.models.HTMLField')()) - - - 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': {'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'}), - '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'}), - 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}), - 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}), - 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) - }, - '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'}), - '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'}) - }, - 'publicweb.decision': { - 'Meta': {'object_name': 'Decision'}, - 'author': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'open_consent_author'", 'null': 'True', 'to': "orm['auth.User']"}), - 'budget': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}), - 'deadline': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), - 'decided_date': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), - 'description': ('django.db.models.fields.TextField', [], {}), - 'effective_date': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), - 'excerpt': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}), - 'expiry_date': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'people': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}), - 'review_date': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), - 'status': ('django.db.models.fields.IntegerField', [], {'default': '0'}), - 'tags': ('tagging.fields.TagField', [], {'null': 'True'}), - 'watchers': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.User']", 'symmetrical': 'False', 'blank': 'True'}) - }, - 'publicweb.feedback': { - 'Meta': {'object_name': 'Feedback'}, - 'decision': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['publicweb.Decision']"}), - 'description': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'rating': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}), - 'resolved': ('django.db.models.fields.BooleanField', [], {'default': 'False'}) - } - } - - complete_apps = ['publicweb'] diff --git a/django/econsensus/publicweb/migrations/0017_auto__add_field_decision_created_date.py b/django/econsensus/publicweb/migrations/0017_auto__add_field_decision_created_date.py deleted file mode 100644 index 24b23509..00000000 --- a/django/econsensus/publicweb/migrations/0017_auto__add_field_decision_created_date.py +++ /dev/null @@ -1,87 +0,0 @@ -#@PydevCodeAnalysisIgnore -# 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 'Decision.created_date' - db.add_column('publicweb_decision', 'created_date', self.gf('django.db.models.fields.DateField')(default=datetime.date(2011, 11, 14), blank=True), keep_default=False) - - - def backwards(self, orm): - - # Deleting field 'Decision.created_date' - db.delete_column('publicweb_decision', 'created_date') - - - 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': {'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'}), - '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'}), - 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}), - 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}), - 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) - }, - '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'}), - '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'}) - }, - 'publicweb.decision': { - 'Meta': {'object_name': 'Decision'}, - 'author': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'open_consent_author'", 'null': 'True', 'to': "orm['auth.User']"}), - 'budget': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}), - 'created_date': ('django.db.models.fields.DateField', [], {'blank': 'True'}), - 'deadline': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), - 'decided_date': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), - 'description': ('django.db.models.fields.TextField', [], {}), - 'effective_date': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), - 'excerpt': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}), - 'expiry_date': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'people': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}), - 'review_date': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), - 'status': ('django.db.models.fields.IntegerField', [], {'default': '0'}), - 'tags': ('tagging.fields.TagField', [], {'null': 'True'}), - 'watchers': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.User']", 'symmetrical': 'False', 'blank': 'True'}) - }, - 'publicweb.feedback': { - 'Meta': {'object_name': 'Feedback'}, - 'decision': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['publicweb.Decision']"}), - 'description': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'rating': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}), - 'resolved': ('django.db.models.fields.BooleanField', [], {'default': 'False'}) - } - } - - complete_apps = ['publicweb'] diff --git a/django/econsensus/publicweb/migrations/0018_auto__chg_field_decision_created_date.py b/django/econsensus/publicweb/migrations/0018_auto__chg_field_decision_created_date.py deleted file mode 100644 index a3970a89..00000000 --- a/django/econsensus/publicweb/migrations/0018_auto__chg_field_decision_created_date.py +++ /dev/null @@ -1,87 +0,0 @@ -#@PydevCodeAnalysisIgnore -# 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 'Decision.created_date' - db.alter_column('publicweb_decision', 'created_date', self.gf('django.db.models.fields.DateField')(null=True)) - - - def backwards(self, orm): - - # Changing field 'Decision.created_date' - db.alter_column('publicweb_decision', 'created_date', self.gf('django.db.models.fields.DateField')(default=datetime.date(2011, 11, 14))) - - - 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': {'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'}), - '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'}), - 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}), - 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}), - 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) - }, - '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'}), - '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'}) - }, - 'publicweb.decision': { - 'Meta': {'object_name': 'Decision'}, - 'author': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'open_consent_author'", 'null': 'True', 'to': "orm['auth.User']"}), - 'budget': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}), - 'created_date': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), - 'deadline': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), - 'decided_date': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), - 'description': ('django.db.models.fields.TextField', [], {}), - 'effective_date': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), - 'excerpt': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}), - 'expiry_date': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'people': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}), - 'review_date': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), - 'status': ('django.db.models.fields.IntegerField', [], {'default': '0'}), - 'tags': ('tagging.fields.TagField', [], {'null': 'True'}), - 'watchers': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.User']", 'symmetrical': 'False', 'blank': 'True'}) - }, - 'publicweb.feedback': { - 'Meta': {'object_name': 'Feedback'}, - 'decision': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['publicweb.Decision']"}), - 'description': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'rating': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}), - 'resolved': ('django.db.models.fields.BooleanField', [], {'default': 'False'}) - } - } - - complete_apps = ['publicweb'] diff --git a/django/econsensus/publicweb/migrations/0019_auto__add_field_decision_archived_date.py b/django/econsensus/publicweb/migrations/0019_auto__add_field_decision_archived_date.py deleted file mode 100644 index 16b0ee4b..00000000 --- a/django/econsensus/publicweb/migrations/0019_auto__add_field_decision_archived_date.py +++ /dev/null @@ -1,88 +0,0 @@ -#@PydevCodeAnalysisIgnore -# 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 'Decision.archived_date' - db.add_column('publicweb_decision', 'archived_date', self.gf('django.db.models.fields.DateField')(null=True, blank=True), keep_default=False) - - - def backwards(self, orm): - - # Deleting field 'Decision.archived_date' - db.delete_column('publicweb_decision', 'archived_date') - - - 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': {'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'}), - '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'}), - 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}), - 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}), - 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) - }, - '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'}), - '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'}) - }, - 'publicweb.decision': { - 'Meta': {'object_name': 'Decision'}, - 'archived_date': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), - 'author': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'open_consent_author'", 'null': 'True', 'to': "orm['auth.User']"}), - 'budget': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}), - 'created_date': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), - 'deadline': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), - 'decided_date': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), - 'description': ('django.db.models.fields.TextField', [], {}), - 'effective_date': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), - 'excerpt': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}), - 'expiry_date': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'people': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}), - 'review_date': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), - 'status': ('django.db.models.fields.IntegerField', [], {'default': '0'}), - 'tags': ('tagging.fields.TagField', [], {'null': 'True'}), - 'watchers': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.User']", 'symmetrical': 'False', 'blank': 'True'}) - }, - 'publicweb.feedback': { - 'Meta': {'object_name': 'Feedback'}, - 'decision': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['publicweb.Decision']"}), - 'description': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'rating': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}), - 'resolved': ('django.db.models.fields.BooleanField', [], {'default': 'False'}) - } - } - - complete_apps = ['publicweb'] diff --git a/django/econsensus/publicweb/migrations/0020_auto__add_field_feedback_author.py b/django/econsensus/publicweb/migrations/0020_auto__add_field_feedback_author.py deleted file mode 100644 index 28aeb152..00000000 --- a/django/econsensus/publicweb/migrations/0020_auto__add_field_feedback_author.py +++ /dev/null @@ -1,88 +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 'Feedback.author' - db.add_column('publicweb_feedback', 'author', self.gf('django.db.models.fields.related.ForeignKey')(blank=True, related_name='publicweb_feedback_related', null=True, to=orm['auth.User']), keep_default=False) - - - def backwards(self, orm): - - # Deleting field 'Feedback.author' - db.delete_column('publicweb_feedback', 'author_id') - - - 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': {'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'}), - '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'}), - 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}), - 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}), - 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) - }, - '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'}), - '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'}) - }, - 'publicweb.decision': { - 'Meta': {'object_name': 'Decision'}, - 'archived_date': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), - 'author': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'publicweb_decision_related'", 'null': 'True', 'to': "orm['auth.User']"}), - 'budget': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}), - 'created_date': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), - 'deadline': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), - 'decided_date': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), - 'description': ('django.db.models.fields.TextField', [], {}), - 'effective_date': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), - 'excerpt': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}), - 'expiry_date': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'people': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}), - 'review_date': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), - 'status': ('django.db.models.fields.IntegerField', [], {'default': '0'}), - 'tags': ('tagging.fields.TagField', [], {'null': 'True'}), - 'watchers': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.User']", 'symmetrical': 'False', 'blank': 'True'}) - }, - 'publicweb.feedback': { - 'Meta': {'object_name': 'Feedback'}, - 'author': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'publicweb_feedback_related'", 'null': 'True', 'to': "orm['auth.User']"}), - 'decision': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['publicweb.Decision']"}), - 'description': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'rating': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}), - 'resolved': ('django.db.models.fields.BooleanField', [], {'default': 'False'}) - } - } - - complete_apps = ['publicweb'] diff --git a/django/econsensus/publicweb/migrations/0021_auto__chg_field_feedback_rating.py b/django/econsensus/publicweb/migrations/0021_auto__chg_field_feedback_rating.py deleted file mode 100644 index 8a010ea0..00000000 --- a/django/econsensus/publicweb/migrations/0021_auto__chg_field_feedback_rating.py +++ /dev/null @@ -1,88 +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 'Feedback.rating' - db.alter_column('publicweb_feedback', 'rating', self.gf('django.db.models.fields.IntegerField')()) - - - def backwards(self, orm): - - # Changing field 'Feedback.rating' - db.alter_column('publicweb_feedback', 'rating', self.gf('django.db.models.fields.IntegerField')(null=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': {'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'}), - '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'}), - 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}), - 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}), - 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) - }, - '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'}), - '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'}) - }, - 'publicweb.decision': { - 'Meta': {'object_name': 'Decision'}, - 'archived_date': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), - 'author': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'publicweb_decision_related'", 'null': 'True', 'to': "orm['auth.User']"}), - 'budget': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}), - 'created_date': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), - 'deadline': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), - 'decided_date': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), - 'description': ('django.db.models.fields.TextField', [], {}), - 'effective_date': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), - 'excerpt': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}), - 'expiry_date': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'people': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}), - 'review_date': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), - 'status': ('django.db.models.fields.IntegerField', [], {'default': '0'}), - 'tags': ('tagging.fields.TagField', [], {'null': 'True'}), - 'watchers': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.User']", 'symmetrical': 'False', 'blank': 'True'}) - }, - 'publicweb.feedback': { - 'Meta': {'object_name': 'Feedback'}, - 'author': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'publicweb_feedback_related'", 'null': 'True', 'to': "orm['auth.User']"}), - 'decision': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['publicweb.Decision']"}), - 'description': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'rating': ('django.db.models.fields.IntegerField', [], {'default': '4'}), - 'resolved': ('django.db.models.fields.BooleanField', [], {'default': 'False'}) - } - } - - complete_apps = ['publicweb'] diff --git a/django/econsensus/publicweb/migrations/0022_auto__chg_field_decision_status.py b/django/econsensus/publicweb/migrations/0022_auto__chg_field_decision_status.py deleted file mode 100644 index 8f1b0e40..00000000 --- a/django/econsensus/publicweb/migrations/0022_auto__chg_field_decision_status.py +++ /dev/null @@ -1,88 +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 'Decision.status' - db.alter_column('publicweb_decision', 'status', self.gf('django.db.models.fields.CharField')(max_length=10)) - - - def backwards(self, orm): - - # Changing field 'Decision.status' - db.alter_column('publicweb_decision', 'status', self.gf('django.db.models.fields.IntegerField')()) - - - 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': {'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'}), - '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'}), - 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}), - 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}), - 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) - }, - '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'}), - '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'}) - }, - 'publicweb.decision': { - 'Meta': {'object_name': 'Decision'}, - 'archived_date': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), - 'author': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'publicweb_decision_related'", 'null': 'True', 'to': "orm['auth.User']"}), - 'budget': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}), - 'created_date': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), - 'deadline': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), - 'decided_date': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), - 'description': ('django.db.models.fields.TextField', [], {}), - 'effective_date': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), - 'excerpt': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}), - 'expiry_date': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'people': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}), - 'review_date': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), - 'status': ('django.db.models.fields.CharField', [], {'default': "'proposal'", 'max_length': '10'}), - 'tags': ('tagging.fields.TagField', [], {'null': 'True'}), - 'watchers': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.User']", 'symmetrical': 'False', 'blank': 'True'}) - }, - 'publicweb.feedback': { - 'Meta': {'object_name': 'Feedback'}, - 'author': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'publicweb_feedback_related'", 'null': 'True', 'to': "orm['auth.User']"}), - 'decision': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['publicweb.Decision']"}), - 'description': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'rating': ('django.db.models.fields.IntegerField', [], {'default': '4'}), - 'resolved': ('django.db.models.fields.BooleanField', [], {'default': 'False'}) - } - } - - complete_apps = ['publicweb'] diff --git a/django/econsensus/publicweb/migrations/0023_status_int_to_char.py b/django/econsensus/publicweb/migrations/0023_status_int_to_char.py deleted file mode 100644 index acaeeea9..00000000 --- a/django/econsensus/publicweb/migrations/0023_status_int_to_char.py +++ /dev/null @@ -1,103 +0,0 @@ -# encoding: utf-8 -import datetime -from south.db import db -from south.v2 import DataMigration -from django.db import models - -class Migration(DataMigration): - - #based on models - conversion_dict = {'0': 'proposal', - '1': 'decision', - '2': 'archived'} - - def _convert_forwards(self, value): - return self.conversion_dict[value] - - def convert_backwards(self, value): - try: - for k,v in self.conversion_dict.items(): - if v==value: - return k - except StopIteration: - raise KeyError - - - def forwards(self, orm): - for decision in orm.Decision.objects.all(): - decision.status = self._convert_forwards(decision.status) - decision.save() - - def backwards(self, orm): - for decision in orm.Decision.objects.all(): - decision.status = self.convert_backwards(decision.status) - decision.save() - - 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': {'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'}), - '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'}), - 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}), - 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}), - 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) - }, - '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'}), - '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'}) - }, - 'publicweb.decision': { - 'Meta': {'object_name': 'Decision'}, - 'archived_date': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), - 'author': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'publicweb_decision_related'", 'null': 'True', 'to': "orm['auth.User']"}), - 'budget': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}), - 'created_date': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), - 'deadline': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), - 'decided_date': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), - 'description': ('django.db.models.fields.TextField', [], {}), - 'effective_date': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), - 'excerpt': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}), - 'expiry_date': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'people': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}), - 'review_date': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), - 'status': ('django.db.models.fields.CharField', [], {'default': "'proposal'", 'max_length': '10'}), - 'tags': ('tagging.fields.TagField', [], {'null': 'True'}), - 'watchers': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.User']", 'symmetrical': 'False', 'blank': 'True'}) - }, - 'publicweb.feedback': { - 'Meta': {'object_name': 'Feedback'}, - 'author': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'publicweb_feedback_related'", 'null': 'True', 'to': "orm['auth.User']"}), - 'decision': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['publicweb.Decision']"}), - 'description': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'rating': ('django.db.models.fields.IntegerField', [], {'default': '4'}), - 'resolved': ('django.db.models.fields.BooleanField', [], {'default': 'False'}) - } - } - - complete_apps = ['publicweb'] diff --git a/django/econsensus/publicweb/migrations/0024_auto__add_field_decision_meeting_people__chg_field_decision_people.py b/django/econsensus/publicweb/migrations/0024_auto__add_field_decision_meeting_people__chg_field_decision_people.py deleted file mode 100644 index 7ea88ae9..00000000 --- a/django/econsensus/publicweb/migrations/0024_auto__add_field_decision_meeting_people__chg_field_decision_people.py +++ /dev/null @@ -1,95 +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 'Decision.meeting_people' - db.add_column('publicweb_decision', 'meeting_people', self.gf('django.db.models.fields.CharField')(max_length=255, null=True, blank=True), keep_default=False) - - # Changing field 'Decision.people' - db.alter_column('publicweb_decision', 'people', self.gf('django.db.models.fields.CharField')(max_length=255, null=True)) - - - def backwards(self, orm): - - # Deleting field 'Decision.meeting_people' - db.delete_column('publicweb_decision', 'meeting_people') - - # Changing field 'Decision.people' - db.alter_column('publicweb_decision', 'people', self.gf('django.db.models.fields.CharField')(default='', max_length=255)) - - - 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': {'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'}), - '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'}), - 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}), - 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}), - 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) - }, - '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'}), - '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'}) - }, - 'publicweb.decision': { - 'Meta': {'object_name': 'Decision'}, - 'archived_date': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), - 'author': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'publicweb_decision_related'", 'null': 'True', 'to': "orm['auth.User']"}), - 'budget': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}), - 'created_date': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), - 'deadline': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), - 'decided_date': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), - 'description': ('django.db.models.fields.TextField', [], {}), - 'effective_date': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), - 'excerpt': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}), - 'expiry_date': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'meeting_people': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}), - 'people': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}), - 'review_date': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), - 'status': ('django.db.models.fields.CharField', [], {'default': "'proposal'", 'max_length': '10'}), - 'tags': ('tagging.fields.TagField', [], {'null': 'True'}), - 'watchers': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.User']", 'symmetrical': 'False', 'blank': 'True'}) - }, - 'publicweb.feedback': { - 'Meta': {'object_name': 'Feedback'}, - 'author': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'publicweb_feedback_related'", 'null': 'True', 'to': "orm['auth.User']"}), - 'decision': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['publicweb.Decision']"}), - 'description': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'rating': ('django.db.models.fields.IntegerField', [], {'default': '4'}), - 'resolved': ('django.db.models.fields.BooleanField', [], {'default': 'False'}) - } - } - - complete_apps = ['publicweb'] diff --git a/django/econsensus/publicweb/migrations/0025_auto__add_field_decision_editor.py b/django/econsensus/publicweb/migrations/0025_auto__add_field_decision_editor.py deleted file mode 100644 index 56bae8bd..00000000 --- a/django/econsensus/publicweb/migrations/0025_auto__add_field_decision_editor.py +++ /dev/null @@ -1,91 +0,0 @@ -# -*- coding: 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 'Decision.editor' - db.add_column('publicweb_decision', 'editor', - self.gf('django.db.models.fields.related.ForeignKey')(blank=True, related_name='publicweb_decision_edited', null=True, to=orm['auth.User']), - keep_default=False) - - - def backwards(self, orm): - # Deleting field 'Decision.editor' - db.delete_column('publicweb_decision', 'editor_id') - - - 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': {'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'}), - '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'}), - 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}), - 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}), - 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) - }, - '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'}), - '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'}) - }, - 'publicweb.decision': { - 'Meta': {'object_name': 'Decision'}, - 'archived_date': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), - 'author': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'publicweb_decision_authored'", 'null': 'True', 'to': "orm['auth.User']"}), - 'budget': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}), - 'created_date': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), - 'deadline': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), - 'decided_date': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), - 'description': ('django.db.models.fields.TextField', [], {}), - 'editor': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'publicweb_decision_edited'", 'null': 'True', 'to': "orm['auth.User']"}), - 'effective_date': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), - 'excerpt': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}), - 'expiry_date': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'meeting_people': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}), - 'people': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}), - 'review_date': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), - 'status': ('django.db.models.fields.CharField', [], {'default': "'proposal'", 'max_length': '10'}), - 'tags': ('tagging.fields.TagField', [], {'null': 'True'}), - 'watchers': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.User']", 'symmetrical': 'False', 'blank': 'True'}) - }, - 'publicweb.feedback': { - 'Meta': {'object_name': 'Feedback'}, - 'author': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'publicweb_feedback_related'", 'null': 'True', 'to': "orm['auth.User']"}), - 'decision': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['publicweb.Decision']"}), - 'description': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'rating': ('django.db.models.fields.IntegerField', [], {'default': '4'}), - 'resolved': ('django.db.models.fields.BooleanField', [], {'default': 'False'}) - } - } - - complete_apps = ['publicweb'] \ No newline at end of file diff --git a/django/econsensus/publicweb/migrations/0026_auto__add_field_decision_last_modified.py b/django/econsensus/publicweb/migrations/0026_auto__add_field_decision_last_modified.py deleted file mode 100644 index 92ccda4a..00000000 --- a/django/econsensus/publicweb/migrations/0026_auto__add_field_decision_last_modified.py +++ /dev/null @@ -1,92 +0,0 @@ -# -*- coding: 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 'Decision.last_modified' - db.add_column('publicweb_decision', 'last_modified', - self.gf('django.db.models.fields.DateTimeField')(auto_now=True, null=True, blank=True), - keep_default=False) - - - def backwards(self, orm): - # Deleting field 'Decision.last_modified' - db.delete_column('publicweb_decision', 'last_modified') - - - 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': {'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'}), - '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'}), - 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}), - 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}), - 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) - }, - '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'}), - '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'}) - }, - 'publicweb.decision': { - 'Meta': {'object_name': 'Decision'}, - 'archived_date': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), - 'author': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'publicweb_decision_authored'", 'null': 'True', 'to': "orm['auth.User']"}), - 'budget': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}), - 'created_date': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), - 'deadline': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), - 'decided_date': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), - 'description': ('django.db.models.fields.TextField', [], {}), - 'editor': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'publicweb_decision_edited'", 'null': 'True', 'to': "orm['auth.User']"}), - 'effective_date': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), - 'excerpt': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}), - 'expiry_date': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'last_modified': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'null': 'True', 'blank': 'True'}), - 'meeting_people': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}), - 'people': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}), - 'review_date': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), - 'status': ('django.db.models.fields.CharField', [], {'default': "'proposal'", 'max_length': '10'}), - 'tags': ('tagging.fields.TagField', [], {'null': 'True'}), - 'watchers': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.User']", 'symmetrical': 'False', 'blank': 'True'}) - }, - 'publicweb.feedback': { - 'Meta': {'object_name': 'Feedback'}, - 'author': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'publicweb_feedback_related'", 'null': 'True', 'to': "orm['auth.User']"}), - 'decision': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['publicweb.Decision']"}), - 'description': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'rating': ('django.db.models.fields.IntegerField', [], {'default': '4'}), - 'resolved': ('django.db.models.fields.BooleanField', [], {'default': 'False'}) - } - } - - complete_apps = ['publicweb'] \ No newline at end of file diff --git a/django/econsensus/publicweb/migrations/0027_auto__del_field_decision_created_date__add_field_decision_creation.py b/django/econsensus/publicweb/migrations/0027_auto__del_field_decision_created_date__add_field_decision_creation.py deleted file mode 100644 index 0d0a9464..00000000 --- a/django/econsensus/publicweb/migrations/0027_auto__del_field_decision_created_date__add_field_decision_creation.py +++ /dev/null @@ -1,100 +0,0 @@ -# -*- coding: 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 field 'Decision.created_date' - db.delete_column('publicweb_decision', 'created_date') - - # Adding field 'Decision.creation' - db.add_column('publicweb_decision', 'creation', - self.gf('django.db.models.fields.DateField')(auto_now_add=True, null=True, blank=True), - keep_default=False) - - - def backwards(self, orm): - # Adding field 'Decision.created_date' - db.add_column('publicweb_decision', 'created_date', - self.gf('django.db.models.fields.DateField')(null=True, blank=True), - keep_default=False) - - # Deleting field 'Decision.creation' - db.delete_column('publicweb_decision', 'creation') - - - 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': {'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'}), - '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'}), - 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}), - 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}), - 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) - }, - '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'}), - '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'}) - }, - 'publicweb.decision': { - 'Meta': {'object_name': 'Decision'}, - 'archived_date': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), - 'author': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'publicweb_decision_authored'", 'null': 'True', 'to': "orm['auth.User']"}), - 'budget': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}), - 'creation': ('django.db.models.fields.DateField', [], {'auto_now_add': 'True', 'null': 'True', 'blank': 'True'}), - 'deadline': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), - 'decided_date': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), - 'description': ('django.db.models.fields.TextField', [], {}), - 'editor': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'publicweb_decision_edited'", 'null': 'True', 'to': "orm['auth.User']"}), - 'effective_date': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), - 'excerpt': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}), - 'expiry_date': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'last_modified': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'null': 'True', 'blank': 'True'}), - 'meeting_people': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}), - 'people': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}), - 'review_date': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), - 'status': ('django.db.models.fields.CharField', [], {'default': "'proposal'", 'max_length': '10'}), - 'tags': ('tagging.fields.TagField', [], {'null': 'True'}), - 'watchers': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.User']", 'symmetrical': 'False', 'blank': 'True'}) - }, - 'publicweb.feedback': { - 'Meta': {'object_name': 'Feedback'}, - 'author': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'publicweb_feedback_related'", 'null': 'True', 'to': "orm['auth.User']"}), - 'decision': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['publicweb.Decision']"}), - 'description': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'rating': ('django.db.models.fields.IntegerField', [], {'default': '4'}), - 'resolved': ('django.db.models.fields.BooleanField', [], {'default': 'False'}) - } - } - - complete_apps = ['publicweb'] \ No newline at end of file diff --git a/django/econsensus/publicweb/migrations/0028_auto__add_field_decision_last_status.py b/django/econsensus/publicweb/migrations/0028_auto__add_field_decision_last_status.py deleted file mode 100644 index e87abc93..00000000 --- a/django/econsensus/publicweb/migrations/0028_auto__add_field_decision_last_status.py +++ /dev/null @@ -1,93 +0,0 @@ -# -*- coding: 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 'Decision.last_status' - db.add_column('publicweb_decision', 'last_status', - self.gf('django.db.models.fields.CharField')(default='proposal', max_length=10), - keep_default=False) - - - def backwards(self, orm): - # Deleting field 'Decision.last_status' - db.delete_column('publicweb_decision', 'last_status') - - - 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': {'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'}), - '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'}), - 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}), - 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}), - 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) - }, - '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'}), - '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'}) - }, - 'publicweb.decision': { - 'Meta': {'object_name': 'Decision'}, - 'archived_date': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), - 'author': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'publicweb_decision_authored'", 'null': 'True', 'to': "orm['auth.User']"}), - 'budget': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}), - 'creation': ('django.db.models.fields.DateField', [], {'auto_now_add': 'True', 'null': 'True', 'blank': 'True'}), - 'deadline': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), - 'decided_date': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), - 'description': ('django.db.models.fields.TextField', [], {}), - 'editor': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'publicweb_decision_edited'", 'null': 'True', 'to': "orm['auth.User']"}), - 'effective_date': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), - 'excerpt': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}), - 'expiry_date': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'last_modified': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'null': 'True', 'blank': 'True'}), - 'last_status': ('django.db.models.fields.CharField', [], {'default': 'None', 'max_length': '10'}), - 'meeting_people': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}), - 'people': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}), - 'review_date': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), - 'status': ('django.db.models.fields.CharField', [], {'default': "'proposal'", 'max_length': '10'}), - 'tags': ('tagging.fields.TagField', [], {'null': 'True'}), - 'watchers': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.User']", 'symmetrical': 'False', 'blank': 'True'}) - }, - 'publicweb.feedback': { - 'Meta': {'object_name': 'Feedback'}, - 'author': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'publicweb_feedback_related'", 'null': 'True', 'to': "orm['auth.User']"}), - 'decision': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['publicweb.Decision']"}), - 'description': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'rating': ('django.db.models.fields.IntegerField', [], {'default': '4'}), - 'resolved': ('django.db.models.fields.BooleanField', [], {'default': 'False'}) - } - } - - complete_apps = ['publicweb'] \ No newline at end of file diff --git a/django/econsensus/publicweb/migrations/0029_auto__remove_m2m_table_watchers.py b/django/econsensus/publicweb/migrations/0029_auto__remove_m2m_table_watchers.py deleted file mode 100644 index 674f3fb0..00000000 --- a/django/econsensus/publicweb/migrations/0029_auto__remove_m2m_table_watchers.py +++ /dev/null @@ -1,95 +0,0 @@ -# -*- coding: 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): - # Removing M2M table for field watchers on 'Decision' - db.delete_table('publicweb_decision_watchers') - - - def backwards(self, orm): - # Adding M2M table for field watchers on 'Decision' - db.create_table('publicweb_decision_watchers', ( - ('id', models.AutoField(verbose_name='ID', primary_key=True, auto_created=True)), - ('decision', models.ForeignKey(orm['publicweb.decision'], null=False)), - ('user', models.ForeignKey(orm['auth.user'], null=False)) - )) - db.create_unique('publicweb_decision_watchers', ['decision_id', 'user_id']) - - - 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': {'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'}), - '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'}), - 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}), - 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}), - 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) - }, - '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'}), - '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'}) - }, - 'publicweb.decision': { - 'Meta': {'object_name': 'Decision'}, - 'archived_date': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), - 'author': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'publicweb_decision_authored'", 'null': 'True', 'to': "orm['auth.User']"}), - 'budget': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}), - 'creation': ('django.db.models.fields.DateField', [], {'auto_now_add': 'True', 'null': 'True', 'blank': 'True'}), - 'deadline': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), - 'decided_date': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), - 'description': ('django.db.models.fields.TextField', [], {}), - 'editor': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'publicweb_decision_edited'", 'null': 'True', 'to': "orm['auth.User']"}), - 'effective_date': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), - 'excerpt': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}), - 'expiry_date': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'last_modified': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'null': 'True', 'blank': 'True'}), - 'last_status': ('django.db.models.fields.CharField', [], {'default': "'new'", 'max_length': '10'}), - 'meeting_people': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}), - 'people': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}), - 'review_date': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), - 'status': ('django.db.models.fields.CharField', [], {'default': "'proposal'", 'max_length': '10'}), - 'tags': ('tagging.fields.TagField', [], {'null': 'True'}) - }, - 'publicweb.feedback': { - 'Meta': {'object_name': 'Feedback'}, - 'author': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'publicweb_feedback_related'", 'null': 'True', 'to': "orm['auth.User']"}), - 'decision': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['publicweb.Decision']"}), - 'description': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'rating': ('django.db.models.fields.IntegerField', [], {'default': '4'}), - 'resolved': ('django.db.models.fields.BooleanField', [], {'default': 'False'}) - } - } - - complete_apps = ['publicweb'] \ No newline at end of file diff --git a/django/econsensus/publicweb/migrations/0030_auto__add_field_decision_organization.py b/django/econsensus/publicweb/migrations/0030_auto__add_field_decision_organization.py deleted file mode 100644 index 763a121b..00000000 --- a/django/econsensus/publicweb/migrations/0030_auto__add_field_decision_organization.py +++ /dev/null @@ -1,130 +0,0 @@ -# -*- coding: 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 'Decision.organization' - db.add_column('publicweb_decision', 'organization', - self.gf('django.db.models.fields.related.ForeignKey')(default=0, to=orm['organizations.Organization']), - keep_default=False) - - - def backwards(self, orm): - # Deleting field 'Decision.organization' - db.delete_column('publicweb_decision', 'organization_id') - - - 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': {'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'}), - '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'}), - 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}), - 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}), - 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) - }, - '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'}), - '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'}) - }, - 'notification.noticetype': { - 'Meta': {'object_name': 'NoticeType'}, - 'default': ('django.db.models.fields.IntegerField', [], {}), - 'description': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'display': ('django.db.models.fields.CharField', [], {'max_length': '50'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'label': ('django.db.models.fields.CharField', [], {'max_length': '40'}) - }, - 'notification.observeditem': { - 'Meta': {'ordering': "['-added']", 'object_name': 'ObservedItem'}, - 'added': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'notice_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['notification.NoticeType']"}), - 'object_id': ('django.db.models.fields.PositiveIntegerField', [], {}), - 'signal': ('django.db.models.fields.TextField', [], {}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}) - }, - 'organizations.organization': { - 'Meta': {'ordering': "['name']", 'object_name': 'Organization'}, - 'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'modified': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'slug': ('django.db.models.fields.SlugField', [], {'unique': 'True', 'max_length': '100'}), - 'users': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.User']", 'through': "orm['organizations.OrganizationUser']", 'symmetrical': 'False'}) - }, - 'organizations.organizationuser': { - 'Meta': {'ordering': "['organization', 'user']", 'unique_together': "(('user', 'organization'),)", 'object_name': 'OrganizationUser'}, - 'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_admin': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'modified': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}), - 'organization': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'organization_users'", 'to': "orm['organizations.Organization']"}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'organization_users'", 'to': "orm['auth.User']"}) - }, - 'publicweb.decision': { - 'Meta': {'object_name': 'Decision'}, - 'archived_date': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), - 'author': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'publicweb_decision_authored'", 'null': 'True', 'to': "orm['auth.User']"}), - 'budget': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}), - 'creation': ('django.db.models.fields.DateField', [], {'auto_now_add': 'True', 'null': 'True', 'blank': 'True'}), - 'deadline': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), - 'decided_date': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), - 'description': ('django.db.models.fields.TextField', [], {}), - 'editor': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'publicweb_decision_edited'", 'null': 'True', 'to': "orm['auth.User']"}), - 'effective_date': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), - 'excerpt': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}), - 'expiry_date': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'last_modified': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'null': 'True', 'blank': 'True'}), - 'last_status': ('django.db.models.fields.CharField', [], {'default': "'new'", 'max_length': '10'}), - 'meeting_people': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}), - 'organization': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['organizations.Organization']"}), - 'people': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}), - 'review_date': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), - 'status': ('django.db.models.fields.CharField', [], {'default': "'proposal'", 'max_length': '10'}), - 'tags': ('tagging.fields.TagField', [], {'null': 'True'}) - }, - 'publicweb.feedback': { - 'Meta': {'object_name': 'Feedback'}, - 'author': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'publicweb_feedback_related'", 'null': 'True', 'to': "orm['auth.User']"}), - 'decision': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['publicweb.Decision']"}), - 'description': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'rating': ('django.db.models.fields.IntegerField', [], {'default': '4'}), - 'resolved': ('django.db.models.fields.BooleanField', [], {'default': 'False'}) - } - } - - complete_apps = ['publicweb'] \ No newline at end of file diff --git a/django/econsensus/publicweb/migrations/0031_auto__add_field_feedback_editor.py b/django/econsensus/publicweb/migrations/0031_auto__add_field_feedback_editor.py deleted file mode 100644 index 55f75896..00000000 --- a/django/econsensus/publicweb/migrations/0031_auto__add_field_feedback_editor.py +++ /dev/null @@ -1,131 +0,0 @@ -# -*- coding: 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 'Feedback.editor' - db.add_column('publicweb_feedback', 'editor', - self.gf('django.db.models.fields.related.ForeignKey')(blank=True, related_name='publicweb_feedback_edited', null=True, to=orm['auth.User']), - keep_default=False) - - - def backwards(self, orm): - # Deleting field 'Feedback.editor' - db.delete_column('publicweb_feedback', 'editor_id') - - - 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': {'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'}), - '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'}), - 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}), - 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}), - 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) - }, - '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'}), - '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'}) - }, - 'notification.noticetype': { - 'Meta': {'object_name': 'NoticeType'}, - 'default': ('django.db.models.fields.IntegerField', [], {}), - 'description': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'display': ('django.db.models.fields.CharField', [], {'max_length': '50'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'label': ('django.db.models.fields.CharField', [], {'max_length': '40'}) - }, - 'notification.observeditem': { - 'Meta': {'ordering': "['-added']", 'object_name': 'ObservedItem'}, - 'added': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'notice_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['notification.NoticeType']"}), - 'object_id': ('django.db.models.fields.PositiveIntegerField', [], {}), - 'signal': ('django.db.models.fields.TextField', [], {}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}) - }, - 'organizations.organization': { - 'Meta': {'ordering': "['name']", 'object_name': 'Organization'}, - 'created': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'modified': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now', 'blank': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'slug': ('django_extensions.db.fields.AutoSlugField', [], {'allow_duplicates': 'False', 'max_length': '100', 'separator': "u'-'", 'unique': 'True', 'populate_from': "'name'", 'overwrite': 'False'}), - 'users': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.User']", 'through': "orm['organizations.OrganizationUser']", 'symmetrical': 'False'}) - }, - 'organizations.organizationuser': { - 'Meta': {'ordering': "['organization', 'user']", 'unique_together': "(('user', 'organization'),)", 'object_name': 'OrganizationUser'}, - 'created': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_admin': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'modified': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now', 'blank': 'True'}), - 'organization': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'organization_users'", 'to': "orm['organizations.Organization']"}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'organization_users'", 'to': "orm['auth.User']"}) - }, - 'publicweb.decision': { - 'Meta': {'object_name': 'Decision'}, - 'archived_date': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), - 'author': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'publicweb_decision_authored'", 'null': 'True', 'to': "orm['auth.User']"}), - 'budget': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}), - 'creation': ('django.db.models.fields.DateField', [], {'auto_now_add': 'True', 'null': 'True', 'blank': 'True'}), - 'deadline': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), - 'decided_date': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), - 'description': ('django.db.models.fields.TextField', [], {}), - 'editor': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'publicweb_decision_edited'", 'null': 'True', 'to': "orm['auth.User']"}), - 'effective_date': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), - 'excerpt': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}), - 'expiry_date': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'last_modified': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'null': 'True', 'blank': 'True'}), - 'last_status': ('django.db.models.fields.CharField', [], {'default': "'new'", 'max_length': '10'}), - 'meeting_people': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}), - 'organization': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['organizations.Organization']"}), - 'people': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}), - 'review_date': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), - 'status': ('django.db.models.fields.CharField', [], {'default': "'proposal'", 'max_length': '10'}), - 'tags': ('tagging.fields.TagField', [], {'null': 'True'}) - }, - 'publicweb.feedback': { - 'Meta': {'object_name': 'Feedback'}, - 'author': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'publicweb_feedback_related'", 'null': 'True', 'to': "orm['auth.User']"}), - 'decision': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['publicweb.Decision']"}), - 'description': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'editor': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'publicweb_feedback_edited'", 'null': 'True', 'to': "orm['auth.User']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'rating': ('django.db.models.fields.IntegerField', [], {'default': '4'}), - 'resolved': ('django.db.models.fields.BooleanField', [], {'default': 'False'}) - } - } - - complete_apps = ['publicweb'] \ No newline at end of file diff --git a/django/econsensus/publicweb/migrations/0032_make_all_users_editors.py b/django/econsensus/publicweb/migrations/0032_make_all_users_editors.py deleted file mode 100644 index 9499d326..00000000 --- a/django/econsensus/publicweb/migrations/0032_make_all_users_editors.py +++ /dev/null @@ -1,150 +0,0 @@ -# -*- coding: utf-8 -*- -import datetime -from south.db import db -from south.v2 import DataMigration -from django.db import models - -class Migration(DataMigration): - - def forwards(self, orm): - #Every User is given the 'edit_decisions_feedback' Permission for - #all of the Organizations to which they belong. - #Note that we pull Organization directly, not from orm[], - #therefore we assume organization model will always have .users - from guardian.shortcuts import assign_perm - from django.contrib.auth.models import Permission - from organizations.models import Organization - try: - perm = Permission.objects.get(codename='edit_decisions_feedback') - except: - print "Couldn't get Permission 'edit_decisions_feedback'." - raise - for org in Organization.objects.all(): - for user in org.users.all(): - assign_perm(perm.codename, user, org) - - def backwards(self, orm): - #Remove the permission from every users organizations - from guardian.shortcuts import remove_perm - from django.contrib.auth.models import Permission - from organizations.models import Organization - try: - perm = Permission.objects.get(codename='edit_decisions_feedback') - except: - print "Couldn't get Permission 'edit_decisions_feedback'." - raise - for org in Organization.objects.all(): - for user in org.users.all(): - remove_perm(perm.codename, user, org) - - 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': {'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'}), - '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'}), - 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}), - 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}), - 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) - }, - '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'}), - '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'}) - }, - 'notification.noticetype': { - 'Meta': {'object_name': 'NoticeType'}, - 'default': ('django.db.models.fields.IntegerField', [], {}), - 'description': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'display': ('django.db.models.fields.CharField', [], {'max_length': '50'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'label': ('django.db.models.fields.CharField', [], {'max_length': '40'}) - }, - 'notification.observeditem': { - 'Meta': {'ordering': "['-added']", 'object_name': 'ObservedItem'}, - 'added': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'notice_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['notification.NoticeType']"}), - 'object_id': ('django.db.models.fields.PositiveIntegerField', [], {}), - 'signal': ('django.db.models.fields.TextField', [], {}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}) - }, - 'organizations.organization': { - 'Meta': {'ordering': "['name']", 'object_name': 'Organization'}, - 'created': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'modified': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now', 'blank': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'slug': ('django_extensions.db.fields.AutoSlugField', [], {'allow_duplicates': 'False', 'max_length': '100', 'separator': "u'-'", 'unique': 'True', 'populate_from': "'name'", 'overwrite': 'False'}), - 'users': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.User']", 'through': "orm['organizations.OrganizationUser']", 'symmetrical': 'False'}) - }, - 'organizations.organizationuser': { - 'Meta': {'ordering': "['organization', 'user']", 'unique_together': "(('user', 'organization'),)", 'object_name': 'OrganizationUser'}, - 'created': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_admin': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'modified': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now', 'blank': 'True'}), - 'organization': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'organization_users'", 'to': "orm['organizations.Organization']"}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'organization_users'", 'to': "orm['auth.User']"}) - }, - 'publicweb.decision': { - 'Meta': {'object_name': 'Decision'}, - 'archived_date': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), - 'author': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'publicweb_decision_authored'", 'null': 'True', 'to': "orm['auth.User']"}), - 'budget': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}), - 'creation': ('django.db.models.fields.DateField', [], {'auto_now_add': 'True', 'null': 'True', 'blank': 'True'}), - 'deadline': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), - 'decided_date': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), - 'description': ('django.db.models.fields.TextField', [], {}), - 'editor': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'publicweb_decision_edited'", 'null': 'True', 'to': "orm['auth.User']"}), - 'effective_date': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), - 'excerpt': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}), - 'expiry_date': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'last_modified': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'null': 'True', 'blank': 'True'}), - 'last_status': ('django.db.models.fields.CharField', [], {'default': "'new'", 'max_length': '10'}), - 'meeting_people': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}), - 'organization': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['organizations.Organization']"}), - 'people': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}), - 'review_date': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), - 'status': ('django.db.models.fields.CharField', [], {'default': "'proposal'", 'max_length': '10'}), - 'tags': ('tagging.fields.TagField', [], {'null': 'True'}) - }, - 'publicweb.feedback': { - 'Meta': {'object_name': 'Feedback'}, - 'author': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'publicweb_feedback_related'", 'null': 'True', 'to': "orm['auth.User']"}), - 'decision': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['publicweb.Decision']"}), - 'description': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'editor': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'publicweb_feedback_edited'", 'null': 'True', 'to': "orm['auth.User']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'rating': ('django.db.models.fields.IntegerField', [], {'default': '4'}), - 'resolved': ('django.db.models.fields.BooleanField', [], {'default': 'False'}) - } - } - - complete_apps = ['publicweb'] - symmetrical = True diff --git a/django/econsensus/publicweb/migrations/0033_auto__add_field_actionitem_origin.py b/django/econsensus/publicweb/migrations/0033_auto__add_field_actionitem_origin.py deleted file mode 100644 index 0611a49d..00000000 --- a/django/econsensus/publicweb/migrations/0033_auto__add_field_actionitem_origin.py +++ /dev/null @@ -1,138 +0,0 @@ -# -*- coding: utf-8 -*- -import datetime -from south.db import db -from south.v2 import SchemaMigration -from django.db import models - - -class Migration(SchemaMigration): - - depends_on = ( - ("actionitems", "0001_initial.py"), - ) - - def forwards(self, orm): - # Adding field 'ActionItem.origin' - db.add_column('actionitems_actionitem', 'origin', - self.gf('django.db.models.fields.related.ForeignKey')(to=orm['publicweb.Decision'], null=True, blank=True), - keep_default=False) - - - def backwards(self, orm): - # Deleting field 'ActionItem.origin' - db.delete_column('actionitems_actionitem', 'origin_id') - - - models = { - 'actionitems.actionitem': { - 'Meta': {'object_name': 'ActionItem'}, - 'completed_on': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'blank': 'True'}), - 'created_on': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime(2013, 1, 14, 0, 0)'}), - 'deadline': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), - 'description': ('django.db.models.fields.TextField', [], {}), - 'done': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'manager': ('django.db.models.fields.CharField', [], {'default': "'internal'", 'max_length': '10'}), - 'origin': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['publicweb.Decision']", 'null': 'True', 'blank': 'True'}), - 'responsible': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'updated_on': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'blank': 'True'}) - }, - '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': {'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'}), - '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'}), - 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}), - 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}), - 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) - }, - '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'}), - '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'}) - }, - 'notification.noticetype': { - 'Meta': {'object_name': 'NoticeType'}, - 'default': ('django.db.models.fields.IntegerField', [], {}), - 'description': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'display': ('django.db.models.fields.CharField', [], {'max_length': '50'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'label': ('django.db.models.fields.CharField', [], {'max_length': '40'}) - }, - 'notification.observeditem': { - 'Meta': {'ordering': "['-added']", 'object_name': 'ObservedItem'}, - 'added': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'notice_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['notification.NoticeType']"}), - 'object_id': ('django.db.models.fields.PositiveIntegerField', [], {}), - 'signal': ('django.db.models.fields.TextField', [], {}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}) - }, - 'organizations.organization': { - 'Meta': {'ordering': "['name']", 'object_name': 'Organization'}, - 'created': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'modified': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now', 'blank': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'slug': ('django_extensions.db.fields.AutoSlugField', [], {'allow_duplicates': 'False', 'max_length': '100', 'separator': "u'-'", 'unique': 'True', 'populate_from': "'name'", 'overwrite': 'False'}), - 'users': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.User']", 'through': "orm['organizations.OrganizationUser']", 'symmetrical': 'False'}) - }, - 'organizations.organizationuser': { - 'Meta': {'ordering': "['organization', 'user']", 'unique_together': "(('user', 'organization'),)", 'object_name': 'OrganizationUser'}, - 'created': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_admin': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'modified': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now', 'blank': 'True'}), - 'organization': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'organization_users'", 'to': "orm['organizations.Organization']"}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'organization_users'", 'to': "orm['auth.User']"}) - }, - 'publicweb.decision': { - 'Meta': {'object_name': 'Decision'}, - 'archived_date': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), - 'author': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'publicweb_decision_authored'", 'null': 'True', 'to': "orm['auth.User']"}), - 'budget': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}), - 'creation': ('django.db.models.fields.DateField', [], {'auto_now_add': 'True', 'null': 'True', 'blank': 'True'}), - 'deadline': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), - 'decided_date': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), - 'description': ('django.db.models.fields.TextField', [], {}), - 'editor': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'publicweb_decision_edited'", 'null': 'True', 'to': "orm['auth.User']"}), - 'effective_date': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), - 'excerpt': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}), - 'expiry_date': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'last_modified': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'null': 'True', 'blank': 'True'}), - 'last_status': ('django.db.models.fields.CharField', [], {'default': "'new'", 'max_length': '10'}), - 'meeting_people': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}), - 'organization': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['organizations.Organization']"}), - 'people': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}), - 'review_date': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), - 'status': ('django.db.models.fields.CharField', [], {'default': "'proposal'", 'max_length': '10'}), - 'tags': ('tagging.fields.TagField', [], {'null': 'True'}) - } - } - - complete_apps = ['actionitems'] diff --git a/django/econsensus/publicweb/migrations/0034_auto__add_notificationsettings__add_unique_notificationsettings_user_o.py b/django/econsensus/publicweb/migrations/0034_auto__add_notificationsettings__add_unique_notificationsettings_user_o.py deleted file mode 100644 index f092ccf2..00000000 --- a/django/econsensus/publicweb/migrations/0034_auto__add_notificationsettings__add_unique_notificationsettings_user_o.py +++ /dev/null @@ -1,176 +0,0 @@ -# -*- coding: 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 'NotificationSettings' - db.create_table('publicweb_notificationsettings', ( - ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), - ('user', self.gf('django.db.models.fields.related.ForeignKey')(related_name='settings', to=orm['auth.User'])), - ('organization', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['organizations.Organization'])), - ('notification_level', self.gf('django.db.models.fields.IntegerField')(default=1)), - )) - db.send_create_signal('publicweb', ['NotificationSettings']) - - # Adding unique constraint on 'NotificationSettings', fields ['user', 'organization'] - db.create_unique('publicweb_notificationsettings', ['user_id', 'organization_id']) - - - # Changing field 'Decision.last_modified' - db.alter_column('publicweb_decision', 'last_modified', self.gf('django.db.models.fields.DateTimeField')(auto_now_add=True, null=True)) - - def backwards(self, orm): - # Removing unique constraint on 'NotificationSettings', fields ['user', 'organization'] - db.delete_unique('publicweb_notificationsettings', ['user_id', 'organization_id']) - - # Deleting model 'NotificationSettings' - db.delete_table('publicweb_notificationsettings') - - - # Changing field 'Decision.last_modified' - db.alter_column('publicweb_decision', 'last_modified', self.gf('django.db.models.fields.DateTimeField')(auto_now=True, null=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': {'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'}), - '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'}), - 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}), - 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}), - 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) - }, - 'comments.comment': { - 'Meta': {'ordering': "('submit_date',)", 'object_name': 'Comment', 'db_table': "'django_comments'"}, - 'comment': ('django.db.models.fields.TextField', [], {'max_length': '3000'}), - 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'content_type_set_for_comment'", 'to': "orm['contenttypes.ContentType']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'ip_address': ('django.db.models.fields.IPAddressField', [], {'max_length': '15', 'null': 'True', 'blank': 'True'}), - 'is_public': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'is_removed': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'object_pk': ('django.db.models.fields.TextField', [], {}), - 'site': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['sites.Site']"}), - 'submit_date': ('django.db.models.fields.DateTimeField', [], {'default': 'None'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'comment_comments'", 'null': 'True', 'to': "orm['auth.User']"}), - 'user_email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}), - 'user_name': ('django.db.models.fields.CharField', [], {'max_length': '50', 'blank': 'True'}), - 'user_url': ('django.db.models.fields.URLField', [], {'max_length': '200', 'blank': 'True'}) - }, - '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'}), - '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'}) - }, - 'notification.noticetype': { - 'Meta': {'object_name': 'NoticeType'}, - 'default': ('django.db.models.fields.IntegerField', [], {}), - 'description': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'display': ('django.db.models.fields.CharField', [], {'max_length': '50'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'label': ('django.db.models.fields.CharField', [], {'max_length': '40'}) - }, - 'notification.observeditem': { - 'Meta': {'ordering': "['-added']", 'object_name': 'ObservedItem'}, - 'added': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'notice_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['notification.NoticeType']"}), - 'object_id': ('django.db.models.fields.PositiveIntegerField', [], {}), - 'signal': ('django.db.models.fields.TextField', [], {}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}) - }, - 'organizations.organization': { - 'Meta': {'ordering': "['name']", 'object_name': 'Organization'}, - 'created': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'modified': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now', 'blank': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '200'}), - 'slug': ('django_extensions.db.fields.AutoSlugField', [], {'allow_duplicates': 'False', 'max_length': '200', 'separator': "u'-'", 'unique': 'True', 'populate_from': "'name'", 'overwrite': 'False'}), - 'users': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.User']", 'through': "orm['organizations.OrganizationUser']", 'symmetrical': 'False'}) - }, - 'organizations.organizationuser': { - 'Meta': {'ordering': "['organization', 'user']", 'unique_together': "(('user', 'organization'),)", 'object_name': 'OrganizationUser'}, - 'created': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_admin': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'modified': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now', 'blank': 'True'}), - 'organization': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'organization_users'", 'to': "orm['organizations.Organization']"}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'organization_users'", 'to': "orm['auth.User']"}) - }, - 'publicweb.decision': { - 'Meta': {'object_name': 'Decision'}, - 'archived_date': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), - 'author': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'publicweb_decision_authored'", 'null': 'True', 'to': "orm['auth.User']"}), - 'budget': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}), - 'creation': ('django.db.models.fields.DateField', [], {'auto_now_add': 'True', 'null': 'True', 'blank': 'True'}), - 'deadline': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), - 'decided_date': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), - 'description': ('django.db.models.fields.TextField', [], {}), - 'editor': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'publicweb_decision_edited'", 'null': 'True', 'to': "orm['auth.User']"}), - 'effective_date': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), - 'excerpt': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}), - 'expiry_date': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'last_modified': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'null': 'True', 'blank': 'True'}), - 'last_status': ('django.db.models.fields.CharField', [], {'default': "'new'", 'max_length': '10'}), - 'meeting_people': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}), - 'organization': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['organizations.Organization']"}), - 'people': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}), - 'review_date': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), - 'status': ('django.db.models.fields.CharField', [], {'default': "'proposal'", 'max_length': '10'}), - 'tags': ('tagging.fields.TagField', [], {'null': 'True'}) - }, - 'publicweb.feedback': { - 'Meta': {'object_name': 'Feedback'}, - 'author': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'publicweb_feedback_related'", 'null': 'True', 'to': "orm['auth.User']"}), - 'decision': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['publicweb.Decision']"}), - 'description': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'editor': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'publicweb_feedback_edited'", 'null': 'True', 'to': "orm['auth.User']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'rating': ('django.db.models.fields.IntegerField', [], {'default': '4'}), - 'resolved': ('django.db.models.fields.BooleanField', [], {'default': 'False'}) - }, - 'publicweb.notificationsettings': { - 'Meta': {'unique_together': "(('user', 'organization'),)", 'object_name': 'NotificationSettings'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'notification_level': ('django.db.models.fields.IntegerField', [], {'default': '1'}), - 'organization': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['organizations.Organization']"}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'settings'", 'to': "orm['auth.User']"}) - }, - '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'}) - } - } - - complete_apps = ['publicweb'] \ No newline at end of file diff --git a/django/econsensus/publicweb/migrations/0035_auto__add_organizationsettings.py b/django/econsensus/publicweb/migrations/0035_auto__add_organizationsettings.py deleted file mode 100644 index f4f6e2ef..00000000 --- a/django/econsensus/publicweb/migrations/0035_auto__add_organizationsettings.py +++ /dev/null @@ -1,169 +0,0 @@ -# -*- coding: 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 'OrganizationSettings' - db.create_table('publicweb_organizationsettings', ( - ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), - ('organization', self.gf('django.db.models.fields.related.OneToOneField')(to=orm['organizations.Organization'], unique=True)), - ('default_notification_level', self.gf('django.db.models.fields.IntegerField')()), - )) - db.send_create_signal('publicweb', ['OrganizationSettings']) - - - def backwards(self, orm): - # Deleting model 'OrganizationSettings' - db.delete_table('publicweb_organizationsettings') - - - 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': {'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'}), - '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'}), - 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}), - 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}), - 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) - }, - 'comments.comment': { - 'Meta': {'ordering': "('submit_date',)", 'object_name': 'Comment', 'db_table': "'django_comments'"}, - 'comment': ('django.db.models.fields.TextField', [], {'max_length': '3000'}), - 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'content_type_set_for_comment'", 'to': "orm['contenttypes.ContentType']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'ip_address': ('django.db.models.fields.IPAddressField', [], {'max_length': '15', 'null': 'True', 'blank': 'True'}), - 'is_public': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'is_removed': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'object_pk': ('django.db.models.fields.TextField', [], {}), - 'site': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['sites.Site']"}), - 'submit_date': ('django.db.models.fields.DateTimeField', [], {'default': 'None'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'comment_comments'", 'null': 'True', 'to': "orm['auth.User']"}), - 'user_email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}), - 'user_name': ('django.db.models.fields.CharField', [], {'max_length': '50', 'blank': 'True'}), - 'user_url': ('django.db.models.fields.URLField', [], {'max_length': '200', 'blank': 'True'}) - }, - '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'}), - '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'}) - }, - 'notification.noticetype': { - 'Meta': {'object_name': 'NoticeType'}, - 'default': ('django.db.models.fields.IntegerField', [], {}), - 'description': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'display': ('django.db.models.fields.CharField', [], {'max_length': '50'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'label': ('django.db.models.fields.CharField', [], {'max_length': '40'}) - }, - 'notification.observeditem': { - 'Meta': {'ordering': "['-added']", 'object_name': 'ObservedItem'}, - 'added': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'notice_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['notification.NoticeType']"}), - 'object_id': ('django.db.models.fields.PositiveIntegerField', [], {}), - 'signal': ('django.db.models.fields.TextField', [], {}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}) - }, - 'organizations.organization': { - 'Meta': {'ordering': "['name']", 'object_name': 'Organization'}, - 'created': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'modified': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now', 'blank': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '200'}), - 'slug': ('django_extensions.db.fields.AutoSlugField', [], {'allow_duplicates': 'False', 'max_length': '200', 'separator': "u'-'", 'unique': 'True', 'populate_from': "'name'", 'overwrite': 'False'}), - 'users': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.User']", 'through': "orm['organizations.OrganizationUser']", 'symmetrical': 'False'}) - }, - 'organizations.organizationuser': { - 'Meta': {'ordering': "['organization', 'user']", 'unique_together': "(('user', 'organization'),)", 'object_name': 'OrganizationUser'}, - 'created': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_admin': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'modified': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now', 'blank': 'True'}), - 'organization': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'organization_users'", 'to': "orm['organizations.Organization']"}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'organization_users'", 'to': "orm['auth.User']"}) - }, - 'publicweb.decision': { - 'Meta': {'object_name': 'Decision'}, - 'archived_date': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), - 'author': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'publicweb_decision_authored'", 'null': 'True', 'to': "orm['auth.User']"}), - 'budget': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}), - 'creation': ('django.db.models.fields.DateField', [], {'auto_now_add': 'True', 'null': 'True', 'blank': 'True'}), - 'deadline': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), - 'decided_date': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), - 'description': ('django.db.models.fields.TextField', [], {}), - 'editor': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'publicweb_decision_edited'", 'null': 'True', 'to': "orm['auth.User']"}), - 'effective_date': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), - 'excerpt': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}), - 'expiry_date': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'last_modified': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'null': 'True', 'blank': 'True'}), - 'last_status': ('django.db.models.fields.CharField', [], {'default': "'new'", 'max_length': '10'}), - 'meeting_people': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}), - 'organization': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['organizations.Organization']"}), - 'people': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}), - 'review_date': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), - 'status': ('django.db.models.fields.CharField', [], {'default': "'proposal'", 'max_length': '10'}), - 'tags': ('tagging.fields.TagField', [], {'null': 'True'}) - }, - 'publicweb.feedback': { - 'Meta': {'object_name': 'Feedback'}, - 'author': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'publicweb_feedback_related'", 'null': 'True', 'to': "orm['auth.User']"}), - 'decision': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['publicweb.Decision']"}), - 'description': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'editor': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'publicweb_feedback_edited'", 'null': 'True', 'to': "orm['auth.User']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'rating': ('django.db.models.fields.IntegerField', [], {'default': '4'}), - 'resolved': ('django.db.models.fields.BooleanField', [], {'default': 'False'}) - }, - 'publicweb.notificationsettings': { - 'Meta': {'unique_together': "(('user', 'organization'),)", 'object_name': 'NotificationSettings'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'notification_level': ('django.db.models.fields.IntegerField', [], {'default': '1'}), - 'organization': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['organizations.Organization']"}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'settings'", 'to': "orm['auth.User']"}) - }, - 'publicweb.organizationsettings': { - 'Meta': {'object_name': 'OrganizationSettings'}, - 'default_notification_level': ('django.db.models.fields.IntegerField', [], {}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'organization': ('django.db.models.fields.related.OneToOneField', [], {'to': "orm['organizations.Organization']", 'unique': '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'}) - } - } - - complete_apps = ['publicweb'] \ No newline at end of file diff --git a/django/econsensus/publicweb/models.py b/django/econsensus/publicweb/models.py index 0bd5a60c..1663974b 100644 --- a/django/econsensus/publicweb/models.py +++ b/django/econsensus/publicweb/models.py @@ -26,7 +26,6 @@ # TODO: Status codes could possibly be harvested off into its # own class with accessor methods to return values. -from south.modelsinspector import add_introspection_rules from signals.management import (DECISION_CHANGE, MINOR_CHANGE, DECISION_NEW, FEEDBACK_NEW, FEEDBACK_CHANGE, COMMENT_NEW, DECISION_STATUS_CHANGE) from publicweb.observation_manager import ObservationManager @@ -36,10 +35,8 @@ from publicweb.extra_models import (STANDARD_SENDING_HEADERS, NotificationSettings, FEEDBACK_MAJOR_CHANGES) # pylint: disable=W0611 from django.dispatch.dispatcher import receiver -from django.contrib.comments.models import Comment -from django.contrib.comments.signals import comment_was_posted - -add_introspection_rules([], ["^tagging\.fields\.TagField"]) +from django_comments.models import Comment +from django_comments.signals import comment_was_posted class Decision(models.Model): @@ -245,7 +242,7 @@ class Feedback(models.Model): author = models.ForeignKey(User, blank=True, null=True, editable=False, related_name="%(app_label)s_%(class)s_related") editor = models.ForeignKey(User, blank=True, null=True, editable=False, related_name="%(app_label)s_%(class)s_edited") decision = models.ForeignKey('Decision', verbose_name=_('Decision')) - resolved = models.BooleanField(verbose_name=_('Resolved')) + resolved = models.BooleanField(verbose_name=_('Resolved'), default=False) rating = models.IntegerField(choices=RATING_CHOICES, default=COMMENT_STATUS) watchers = generic.GenericRelation(notification.ObservedItem) @@ -311,6 +308,7 @@ def additional_message_required(user, decision, level): return result + def change_observers(watch, decision, watcher): if watch: if not notification.is_observing(decision, watcher): @@ -319,6 +317,7 @@ def change_observers(watch, decision, watcher): if notification.is_observing(decision, watcher): notification.stop_observing(decision, watcher) + @receiver(models.signals.post_save, sender=Decision, dispatch_uid="publicweb.models.decision_signal_handler") def decision_signal_handler(sender, **kwargs): """ @@ -369,6 +368,7 @@ def feedback_signal_handler(sender, **kwargs): else: observation_manager.send_notifications(org_users, instance, MINOR_CHANGE, extra_context, headers, from_email=instance.decision.get_email()) + @receiver(comment_was_posted, sender=Comment, dispatch_uid="publicweb.models.comment_posted_signal_handler") def comment_posted_signal_handler(sender, **kwargs): """ From 050b72d964f3e32619aeb1cdfb664da33e3dd78f Mon Sep 17 00:00:00 2001 From: Daniel Levy Date: Thu, 2 Apr 2015 10:40:48 +0100 Subject: [PATCH 2/5] Fix DecisionList pagination --- django/econsensus/publicweb/views.py | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/django/econsensus/publicweb/views.py b/django/econsensus/publicweb/views.py index c4d493ce..0760efeb 100644 --- a/django/econsensus/publicweb/views.py +++ b/django/econsensus/publicweb/views.py @@ -1,6 +1,6 @@ from django.contrib import messages from django.contrib.auth.decorators import login_required -from django.contrib.comments.models import Comment +from django_comments.models import Comment from django.contrib.contenttypes.models import ContentType from django.http import (HttpResponse, HttpResponseRedirect, HttpResponseForbidden, Http404) @@ -32,6 +32,8 @@ ActionItemListView) from django.core.urlresolvers import reverse from signals.management import DECISION_CHANGE +from django.core.paginator import EmptyPage + class YourDetails(UpdateView): template_name = 'your_details.html' @@ -380,15 +382,21 @@ def build_prev_query_string(self, context): if not context['page_obj']: return None else: - return self.build_query_string(context, - context['page_obj'].previous_page_number()) + if context['page_obj'].number > 1: + previous_page_number = context['page_obj'].previous_page_number() + else: + previous_page_number = 1 + return self.build_query_string(context, previous_page_number) def build_next_query_string(self, context): if not context['page_obj']: return None else: - return self.build_query_string(context, - context['page_obj'].next_page_number()) + try: + next_page_number = context['page_obj'].next_page_number() + except EmptyPage: + next_page_number = 1 + return self.build_query_string(context, next_page_number) def build_query_string(self, context, page_num): page_query = 'page=' + str(page_num) From 0a75d18075eb43f56b6c403a079f966847477a84 Mon Sep 17 00:00:00 2001 From: Daniel Levy Date: Thu, 2 Apr 2015 10:47:19 +0100 Subject: [PATCH 3/5] Update to work with latest django --- deploy/pip_packages.txt | 23 +++--- django/econsensus/custom_comments/forms.py | 2 +- .../econsensus/custom_organizations/urls.py | 2 +- django/econsensus/econsensus/settings.py | 36 ++++---- django/econsensus/econsensus/urls.py | 4 +- .../management/commands/process_email.py | 82 +++++++++---------- django/econsensus/publicweb/managers.py | 10 +-- .../publicweb/tests/feedback_test.py | 30 +++---- .../publicweb/tests/settings_test.py | 1 + django/econsensus/publicweb/urls.py | 2 +- 10 files changed, 98 insertions(+), 94 deletions(-) diff --git a/deploy/pip_packages.txt b/deploy/pip_packages.txt index 12a93beb..114f3b83 100644 --- a/deploy/pip_packages.txt +++ b/deploy/pip_packages.txt @@ -4,27 +4,28 @@ virtualenv -e git+git://github.com/aptivate/dye.git@0ebe0738bbfda715caeeb95e7e18f7463adf714c#egg=dye # core django -Django==1.4.13 +Django==1.7.4 +django-markup-deprecated==0.0.3 mysql-python==1.2.3 -South==0.7.5 -django-tinymce==1.5.1a2 +-e git+https://github.com/aljosa/django-tinymce.git@f80966cef06851a6b351293e8a92ca0c623ef3f5#egg=django-tinymce mechanize==0.2.5 -django-floppyforms==0.4.5 +django-floppyforms==1.3.0 lxml==2.2.4 BeautifulSoup==3.2.0 git+git://github.com/jdunck/python-unicodecsv.git django-tagging==0.3.1 -hg+https://bitbucket.org/bkroeze/django-livesettings -django-keyedcache==1.4-6 -django-registration==1.0 +django-livesettings==1.4-14 +django-keyedcache==1.5.1 +django-registration-redux==1.1 -e ../django/django-organizations git+git://github.com/aptivate/django-notification.git@emails-with-headers -git+git://github.com/birdsarah/django-actionitems.git -django-guardian==1.1.1 +git+git://github.com/daniell/django-actionitems.git +django-guardian==1.2.5 django-remember_me==0.2d0 django-parsley==0.0.2a0 -django-waffle==0.9.1 +django-waffle==0.10.1 +django-contrib-comments Markdown==2.3.1 -e git+git://github.com/aptivate/aptivate-monkeypatch.git@ed4f821d8d57ba181c418b8d78dfd8bca70d6817#egg=aptivate_monkeypatch @@ -46,4 +47,4 @@ django-selenium==0.9.6 pytz==2013d # only required for developer machines -django-debug-toolbar==0.9.4 +django-debug-toolbar==1.3.0 diff --git a/django/econsensus/custom_comments/forms.py b/django/econsensus/custom_comments/forms.py index 98d5d7c1..f4a3b9c2 100644 --- a/django/econsensus/custom_comments/forms.py +++ b/django/econsensus/custom_comments/forms.py @@ -1,4 +1,4 @@ -from django.contrib.comments.forms import CommentForm, COMMENT_MAX_LENGTH +from django_comments.forms import CommentForm, COMMENT_MAX_LENGTH from django.utils.translation import ungettext, ugettext_lazy as _ from django import forms from parsley.decorators import parsleyfy diff --git a/django/econsensus/custom_organizations/urls.py b/django/econsensus/custom_organizations/urls.py index f514b5b4..2ceb40b4 100644 --- a/django/econsensus/custom_organizations/urls.py +++ b/django/econsensus/custom_organizations/urls.py @@ -1,4 +1,4 @@ -from django.conf.urls.defaults import patterns, include, url +from django.conf.urls import patterns, url, include from django.contrib.auth.decorators import login_required from views import (OrganizationAdminView, CustomOrganizationCreate, diff --git a/django/econsensus/econsensus/settings.py b/django/econsensus/econsensus/settings.py index cf80243a..2759f0f9 100644 --- a/django/econsensus/econsensus/settings.py +++ b/django/econsensus/econsensus/settings.py @@ -24,11 +24,11 @@ DATABASES = { 'default': { 'ENGINE': 'django.db.backends.', # Add 'postgresql_psycopg2', 'postgresql', 'mysql', 'sqlite3' or 'oracle'. - 'NAME': '', # Or path to database file if using sqlite3. - 'USER': '', # Not used with sqlite3. - 'PASSWORD': '', # Not used with sqlite3. - 'HOST': '', # Set to empty string for localhost. Not used with sqlite3. - 'PORT': '', # Set to empty string for default. Not used with sqlite3. + 'NAME': '', # Or path to database file if using sqlite3. + 'USER': '', # Not used with sqlite3. + 'PASSWORD': '', # Not used with sqlite3. + 'HOST': '', # Set to empty string for localhost. Not used with sqlite3. + 'PORT': '', # Set to empty string for default. Not used with sqlite3. } } @@ -45,7 +45,7 @@ # http://www.i18nguy.com/unicode/language-identifiers.html LANGUAGE_CODE = 'en-GB' -#Need to figure out what this means... +# Need to figure out what this means... SITE_ID = 1 # If you set this to False, Django will make some optimizations so as not @@ -86,7 +86,7 @@ STATICFILES_FINDERS = ( 'django.contrib.staticfiles.finders.FileSystemFinder', 'django.contrib.staticfiles.finders.AppDirectoriesFinder', - #'django.contrib.staticfiles.finders.DefaultStorageFinder', + # 'django.contrib.staticfiles.finders.DefaultStorageFinder', ) # Make this unique, and don't share it with anybody. @@ -96,7 +96,7 @@ TEMPLATE_LOADERS = ( 'django.template.loaders.filesystem.Loader', 'django.template.loaders.app_directories.Loader', - #'django.template.loaders.eggs.Loader', + # 'django.template.loaders.eggs.Loader', ) MIDDLEWARE_CLASSES = ( @@ -139,10 +139,9 @@ 'django.contrib.sessions', 'django.contrib.messages', 'django.contrib.staticfiles', - 'django.contrib.comments', + 'django_comments', 'django.contrib.flatpages', - 'django.contrib.markup', - 'south', + 'markup_deprecated', 'registration', 'waffle', 'notification', @@ -279,17 +278,20 @@ def skip_suspicious_operations(record): EMAIL_BACKEND = 'django.core.mail.backends.dummy.EmailBackend' -#Emails from organizations will be built around this address +# Emails from organizations will be built around this address DEFAULT_FROM_EMAIL = 'econsensus@econsensus.org' -#Required for djangoregistration: +# Required for djangoregistration: ACCOUNT_ACTIVATION_DAYS = 7 -#using custom comments app +# using custom comments app COMMENTS_APP = 'custom_comments' -#Requirements for django-keyedcache, which is a requirement of django-livesettings. -CACHE_PREFIX = str(SITE_ID) +# Requirements for django-keyedcache, which is a requirement of django-livesettings. +CACHES = {'default': { + 'KEY_PREFIX': str(SITE_ID), + 'BACKEND': 'django.core.cache.backends.locmem.LocMemCache', +}} CACHE_TIMEOUT = 0 import logging logging.getLogger('keyedcache').setLevel(logging.INFO) @@ -309,7 +311,7 @@ def skip_suspicious_operations(record): #-------------------------------- # local settings import -#from http://djangosnippets.org/snippets/1873/ +# from http://djangosnippets.org/snippets/1873/ #-------------------------------- try: import local_settings diff --git a/django/econsensus/econsensus/urls.py b/django/econsensus/econsensus/urls.py index cf626cd6..f25a8fab 100644 --- a/django/econsensus/econsensus/urls.py +++ b/django/econsensus/econsensus/urls.py @@ -1,4 +1,4 @@ -from django.conf.urls.defaults import patterns, include, url +from django.conf.urls import patterns, include, url from django.contrib import admin from django.contrib.staticfiles.urls import staticfiles_urlpatterns from django.core.urlresolvers import reverse_lazy @@ -17,7 +17,7 @@ url(r'^admin/', include(admin.site.urls), name='admin'), url(r'^settings/', include('livesettings.urls')), url(r'^notification/', include('notification.urls')), - url(r'^comments/', include('django.contrib.comments.urls')), + url(r'^comments/', include('django_comments.urls')), url(r'^organizations/', include('custom_organizations.urls')), url(r'^invitations/', include(invitation_backend().get_urls())), # the pages adds a / at the start, so don't put the / after pages diff --git a/django/econsensus/publicweb/management/commands/process_email.py b/django/econsensus/publicweb/management/commands/process_email.py index 7efc49a5..07d5f503 100644 --- a/django/econsensus/publicweb/management/commands/process_email.py +++ b/django/econsensus/publicweb/management/commands/process_email.py @@ -1,4 +1,4 @@ -#management command to update the site with any mail +# management command to update the site with any mail import poplib import re import logging @@ -7,7 +7,7 @@ from django.core.management.base import BaseCommand from django.core.exceptions import MultipleObjectsReturned, ObjectDoesNotExist from django.contrib.auth.models import User -from django.contrib.comments.models import Comment +from django_comments.models import Comment from django.contrib.sites.models import Site from django.contrib.contenttypes.models import ContentType from django.utils import timezone @@ -18,14 +18,14 @@ from django.conf import settings def is_autoreply(mail): - return 'Precedence' in mail and (mail['Precedence'] == "bulk" or + return 'Precedence' in mail and (mail['Precedence'] == "bulk" or mail['Precedence'] == "auto_reply") class Command(BaseCommand): args = '' help = 'Checks for emails and posts content to site.' - def handle(self, *args, **options): # pylint: disable=R0914 + def handle(self, *args, **options): # pylint: disable=R0914 verbosity = int(options.get('verbosity', 1)) user = config_value('ReceiveMail', 'USERNAME') password = config_value('ReceiveMail', 'PASSWORD') @@ -35,9 +35,9 @@ def handle(self, *args, **options): # pylint: disable=R0914 logger = logging.getLogger('econsensus') try: - if ssl == True: + if ssl: mailbox = poplib.POP3_SSL(server, port) - else: + else: mailbox = poplib.POP3(server, port) mailbox.user(user) @@ -48,29 +48,29 @@ def handle(self, *args, **options): # pylint: disable=R0914 except Exception as e: logger.error(e) raise - + num_msgs = mailbox.stat()[0] all_msgs = range(1, num_msgs + 1) if all_msgs: - self._print_if_verbose(verbosity, "Processing contents of mailbox.") + self._print_if_verbose(verbosity, "Processing contents of mailbox.") for i in all_msgs: msg = "\n".join(mailbox.retr(i)[1]) - mail = message_from_string(msg) + mail = message_from_string(msg) if is_autoreply(mail): - log_auto_replies = getattr(settings, 'LOG_AUTO_REPLIES', + log_auto_replies = getattr(settings, 'LOG_AUTO_REPLIES', False) if log_auto_replies: logger.info(msg) continue - + try: self._process_email(mail, verbosity) except Exception as e: logger.error(e) - finally: + finally: mailbox.dele(i) - else: self._print_if_verbose(verbosity, "Nothing to do!") + else: self._print_if_verbose(verbosity, "Nothing to do!") mailbox.quit() @@ -82,11 +82,11 @@ def _strip_string(self, payload, verbosity): self._print_if_verbose(verbosity, "Email message payload was empty!") return msg_string - def _process_email(self, mail, verbosity): # pylint: disable=R0914 + def _process_email(self, mail, verbosity): # pylint: disable=R0914 logger = logging.getLogger('econsensus') - #handle multipart mails, cycle through mail - #until find text type with a full payload. + # handle multipart mails, cycle through mail + # until find text type with a full payload. if mail.is_multipart(): for message in mail.get_payload(): if message.get_content_maintype() == 'text': @@ -94,13 +94,13 @@ def _process_email(self, mail, verbosity): # pylint: disable=R0914 if msg_string: break else: - msg_string = self._strip_string(mail.get_payload(), verbosity) - + msg_string = self._strip_string(mail.get_payload(), verbosity) + if not msg_string: logger.error("[EMAIL REJECTED] From '%s' Reason: Email payload empty" % mail['From']) return - - #Must match email 'from' address to user + + # Must match email 'from' address to user from_match = re.search('([\w\-\.]+@\w[\w\-]+\.+[\w\-]+)', mail['From']) if from_match: self._print_if_verbose(verbosity, "Found email 'from' '%s'" % from_match.group(1)) @@ -118,8 +118,8 @@ def _process_email(self, mail, verbosity): # pylint: disable=R0914 else: logger.error("[EMAIL REJECTED] From '%s' Reason: Unrecognised email address format" % mail['From']) return - - #Must match email 'to' address to organization + + # Must match email 'to' address to organization org_match = re.search('([\w\-\.]+)@\w[\w\-]+\.+[\w\-]+', mail['To']) if org_match: self._print_if_verbose(verbosity, "Found email 'to' '%s'" % org_match.group(1)) @@ -138,16 +138,16 @@ def _process_email(self, mail, verbosity): # pylint: disable=R0914 logger.error("[EMAIL REJECTED] From '%s' Reason: Couldn't pull Organization from '%s'" % (mail['From'], mail['To'])) return - #User must be a member of the Organization + # User must be a member of the Organization if organization not in Organization.active.get_for_user(user): self._print_if_verbose(verbosity, "User %s is not a member of Organization %s" % (user.username, organization.name)) logger.error("[EMAIL REJECTED] From '%s' Reason: User '%s' is not a member of Organization '%s'" \ % (mail['From'], user.username, organization.name)) return - #Look for feedback types in the message body - rating = Feedback.COMMENT_STATUS - description = msg_string + # Look for feedback types in the message body + rating = Feedback.COMMENT_STATUS + description = msg_string parse_feedback = re.match('(\w+)\s*:\s*([\s\S]*)', msg_string, re.IGNORECASE) if parse_feedback: description = parse_feedback.group(2) @@ -159,7 +159,7 @@ def _process_email(self, mail, verbosity): # pylint: disable=R0914 # Determine whether email is in reply to a notification subject_match = re.search('\[EC#(\d+)(?:\\\\(\d+)(?:\\\\(\d+))?)?\]', mail['Subject']) if subject_match: - #Check that the user has the right to comment against the decision. + # Check that the user has the right to comment against the decision. if subject_match.group(1): self._print_if_verbose(verbosity, "Found decision id '%s' in Subject" % subject_match.group(1)) try: @@ -176,8 +176,8 @@ def _process_email(self, mail, verbosity): # pylint: disable=R0914 logger.error("[EMAIL REJECTED] From '%s' Reason: User cannot reply to decision #%s because they are not a member of that organization." \ % (mail['From'], subject_match.group(1))) return - - #process comment or feedback against feedback + + # process comment or feedback against feedback if subject_match.group(2): self._print_if_verbose(verbosity, "Found feedback id '%s' in Subject" % subject_match.group(2)) try: @@ -190,7 +190,7 @@ def _process_email(self, mail, verbosity): # pylint: disable=R0914 logger.error("[EMAIL REJECTED] From '%s' Reason: Query returned more than one Feedback for id '%s'" \ % (mail['From'], subject_match.group(2))) return - + if parse_feedback and rating_match: decision = feedback.decision self._print_if_verbose(verbosity, "Creating feedback with rating '%s' and description '%s'." % (rating, description)) @@ -199,31 +199,31 @@ def _process_email(self, mail, verbosity): # pylint: disable=R0914 logger.info("User '%s' added feedback via email to decision #%s" % (user, decision.id)) self._print_if_verbose(verbosity, "Found corresponding object '%s'" % decision.excerpt) else: - comment_text = msg_string + comment_text = msg_string self._print_if_verbose(verbosity, "Creating comment '%s'." % (comment_text)) comment = Comment(user=user, user_name=user.get_full_name(), user_email=user.email, - comment = comment_text, - content_object=feedback, + comment=comment_text, + content_object=feedback, object_pk=feedback.id, content_type=ContentType.objects.get(app_label="publicweb", model="feedback"), - submit_date = timezone.now(), - site = Site.objects.get_current()) + submit_date=timezone.now(), + site=Site.objects.get_current()) comment.save() logger.info("User '%s' added comment via email to feedback #%s" % (user, feedback.id)) self._print_if_verbose(verbosity, "Found corresponding object '%s'" % feedback.description) - - #process feedback against decision + + # process feedback against decision elif subject_match.group(1): self._print_if_verbose(verbosity, "Creating feedback with rating '%s' and description '%s'." % (rating, description)) feedback = Feedback(author=user, decision=decision, rating=rating, description=description) feedback.save() logger.info("User '%s' added feedback via email to decision #%s" % (user, decision.id)) self._print_if_verbose(verbosity, "Found corresponding object '%s'" % decision.excerpt) - + else: - self._print_if_verbose(verbosity, "No id found in message subject: %s" % mail['Subject']) + self._print_if_verbose(verbosity, "No id found in message subject: %s" % mail['Subject']) logger.error("[EMAIL REJECTED] From '%s' Reason: No id present." \ % mail['From']) # Email was not in reply to a notification so create a new proposal @@ -233,7 +233,7 @@ def _process_email(self, mail, verbosity): # pylint: disable=R0914 decision = Decision(author=user, editor=user, status=Decision.PROPOSAL_STATUS, organization=organization, \ description=msg_string) decision.save() - self._print_if_verbose(verbosity, "User '%s' created decision #%s via email" % (user, decision.id)) + self._print_if_verbose(verbosity, "User '%s' created decision #%s via email" % (user, decision.id)) logger.info("User '%s' created decision #%s via email" % (user, decision.id)) else: @@ -242,4 +242,4 @@ def _process_email(self, mail, verbosity): # pylint: disable=R0914 def _print_if_verbose(self, verbosity, message): if verbosity > 1: - print message \ No newline at end of file + print message diff --git a/django/econsensus/publicweb/managers.py b/django/econsensus/publicweb/managers.py index 919370cd..20828906 100644 --- a/django/econsensus/publicweb/managers.py +++ b/django/econsensus/publicweb/managers.py @@ -1,4 +1,4 @@ -#Model managers for models +# Model managers for models from django.db import models from django.db.models.aggregates import Count @@ -6,14 +6,14 @@ class DecisionManager(models.Manager): def order_by_case_insensitive(self, sort_field, sort_order): - #Django does not yet have case insensitive ordering it is left to db https://code.djangoproject.com/ticket/6498 - return super(DecisionManager, self).get_query_set()\ + # Django does not yet have case insensitive ordering it is left to db https://code.djangoproject.com/ticket/6498 + return super(DecisionManager, self).get_queryset()\ .extra(select={'lower': "lower(" + sort_field + ")"}).order_by(sort_order + 'lower') def order_by_count(self, sort_field, sort_order): - return super(DecisionManager, self).get_query_set()\ + return super(DecisionManager, self).get_queryset()\ .annotate(count=Count(sort_field)).order_by(sort_order + 'count') def order_null_last(self, field): - return super(DecisionManager, self).get_query_set()\ + return super(DecisionManager, self).get_queryset()\ .extra(select={'has_field': "CASE WHEN " + field + " IS NULL THEN 1 ELSE 0 END"}).order_by('has_field', field) diff --git a/django/econsensus/publicweb/tests/feedback_test.py b/django/econsensus/publicweb/tests/feedback_test.py index 7f44cc2e..5d86fb75 100644 --- a/django/econsensus/publicweb/tests/feedback_test.py +++ b/django/econsensus/publicweb/tests/feedback_test.py @@ -6,29 +6,30 @@ from publicweb.extra_models import FEEDBACK_MAJOR_CHANGES, NotificationSettings from publicweb.models import Feedback + class FeedbackTest(DecisionTestCase): def test_feedback_has_rating(self): decision = self.create_and_return_example_decision_with_feedback() feedback = decision.feedback_set.all()[0] - self.assertEquals(True, hasattr(feedback, "rating"), + self.assertEquals(True, hasattr(feedback, "rating"), "Concern does not have a 'rating' attribute") def test_email_sent_when_feedback_edited(self): decision = self.create_and_return_example_decision_with_feedback() settings = NotificationSettings.objects.get( - user=self.betty, + user=self.betty, organization=decision.organization ) settings.notification_level = FEEDBACK_MAJOR_CHANGES settings.save() feedback = decision.feedback_set.all()[0] self.assertEqual(feedback.author, self.betty) - + # edit feedback, not as author - self.login(self.charlie) + self.login(self.charlie.username) assign_perm('edit_decisions_feedback', self.user, self.bettysorg) form = FeedbackForm(instance=feedback) form.fields['description'] = "New Updated description." @@ -44,36 +45,35 @@ def test_email_sent_when_feedback_edited(self): self.assertEqual(302, response.status_code) self.assertEqual(1, len(mail.outbox)) - def test_adding_feedback_with_watch_set_adds_user_as_watcher(self): decision = self.create_and_return_decision() decision.watchers = [] decision.save() - + # edit feedback, not as author - self.login(self.charlie) + self.login(self.charlie.username) assign_perm('edit_decisions_feedback', self.user, self.bettysorg) - + data = {'watch': "True", 'description': "New Updated description.", 'rating': Feedback.CONSENT_STATUS } - + self.client.post(reverse('publicweb_feedback_create', args=[decision.id]), data) - + watchers = [watcher.user for watcher in decision.watchers.all()] self.assertIn(self.user, watchers) - + def test_adding_feedback_without_watch_set_doesnt_add_user_as_watcher(self): decision = self.create_and_return_decision() decision.watchers = [] decision.save() - + # edit feedback, not as author - self.login(self.charlie) + self.login(self.charlie.username) assign_perm('edit_decisions_feedback', self.user, self.bettysorg) - + data = { 'description': "New Updated description.", 'rating': Feedback.CONSENT_STATUS @@ -82,6 +82,6 @@ def test_adding_feedback_without_watch_set_doesnt_add_user_as_watcher(self): mail.outbox = [] self.client.post(reverse('publicweb_feedback_create', args=[decision.id]), data) - + watchers = [watcher.user for watcher in decision.watchers.all()] self.assertNotIn(self.user, watchers) diff --git a/django/econsensus/publicweb/tests/settings_test.py b/django/econsensus/publicweb/tests/settings_test.py index 7eb79411..34d9b522 100644 --- a/django/econsensus/publicweb/tests/settings_test.py +++ b/django/econsensus/publicweb/tests/settings_test.py @@ -81,6 +81,7 @@ def test_user_notification_settings_view_context_contains_organisation(self): notification_settings_view.object = MagicMock(spec=NotificationSettings) notification_settings_view.organization = create_fake_organization(id=2) + notification_settings_view.context_object_name = 'settings' context = notification_settings_view.get_context_data() self.assertIn('organization', context) self.assertTrue(context['organization']) diff --git a/django/econsensus/publicweb/urls.py b/django/econsensus/publicweb/urls.py index e960a3be..3e761a4b 100644 --- a/django/econsensus/publicweb/urls.py +++ b/django/econsensus/publicweb/urls.py @@ -1,4 +1,4 @@ -from django.conf.urls.defaults import patterns, url +from django.conf.urls import patterns, url from django.contrib.auth.decorators import login_required from django.views.generic.detail import DetailView From 6b6bb3ca9ddb0673ab03578655b69843a2333ee2 Mon Sep 17 00:00:00 2001 From: Daniel Levy Date: Fri, 12 Jun 2015 14:41:15 +0100 Subject: [PATCH 4/5] Make tests Django 1.8 compatible --- deploy/pip_packages.txt | 8 +- django/django-organizations | 2 +- .../migrations/0003_auto_20150612_1052.py | 20 ++ .../publicweb/tests/add_comments_test.py | 2 +- .../publicweb/tests/command_test.py | 220 +++++++++--------- .../econsensus/publicweb/tests/factories.py | 10 +- .../publicweb/tests/open_consent_test_case.py | 23 +- .../publicweb/tests/templatetags_test.py | 22 +- django/econsensus/test_runner.py | 5 +- 9 files changed, 166 insertions(+), 146 deletions(-) create mode 100644 django/econsensus/publicweb/migrations/0003_auto_20150612_1052.py diff --git a/deploy/pip_packages.txt b/deploy/pip_packages.txt index 114f3b83..119342ae 100644 --- a/deploy/pip_packages.txt +++ b/deploy/pip_packages.txt @@ -14,14 +14,14 @@ django-floppyforms==1.3.0 lxml==2.2.4 BeautifulSoup==3.2.0 git+git://github.com/jdunck/python-unicodecsv.git -django-tagging==0.3.1 -django-livesettings==1.4-14 +django-tagging==0.3.6 +-e hg+https://bitbucket.org/aptivate/django-livesettings#egg=django-livesettings django-keyedcache==1.5.1 django-registration-redux==1.1 -e ../django/django-organizations git+git://github.com/aptivate/django-notification.git@emails-with-headers git+git://github.com/daniell/django-actionitems.git -django-guardian==1.2.5 +django-guardian==1.3 django-remember_me==0.2d0 django-parsley==0.0.2a0 django-waffle==0.10.1 @@ -30,7 +30,7 @@ Markdown==2.3.1 -e git+git://github.com/aptivate/aptivate-monkeypatch.git@ed4f821d8d57ba181c418b8d78dfd8bca70d6817#egg=aptivate_monkeypatch # for search -django-haystack==2.1.0 +django-haystack==2.3.1 requests==1.2.3 simplejson==3.3.0 pyelasticsearch==0.6 diff --git a/django/django-organizations b/django/django-organizations index 75e6f5e5..3ac86749 160000 --- a/django/django-organizations +++ b/django/django-organizations @@ -1 +1 @@ -Subproject commit 75e6f5e53a027d1caf86f3fde5086dbb044e69a3 +Subproject commit 3ac867493508612370066c00ca7bd8d55632e116 diff --git a/django/econsensus/publicweb/migrations/0003_auto_20150612_1052.py b/django/econsensus/publicweb/migrations/0003_auto_20150612_1052.py new file mode 100644 index 00000000..fc11cd8e --- /dev/null +++ b/django/econsensus/publicweb/migrations/0003_auto_20150612_1052.py @@ -0,0 +1,20 @@ +# -*- coding: utf-8 -*- +from __future__ import unicode_literals + +from django.db import models, migrations + + +class Migration(migrations.Migration): + + dependencies = [ + ('publicweb', '0002_auto_20150312_1203'), + ] + + operations = [ + migrations.AlterField( + model_name='notificationsettings', + name='notification_level', + field=models.IntegerField(default=3, help_text='Levels are cumulative, so if, for example, you choose to get notifications of replies to feedback, you will get notifications of all changes to main items as well.', verbose_name='Notification level', choices=[(0, '1. Silent'), (1, '2. Major events'), (2, '3. Feedback and changes'), (3, '4. Full discussion'), (4, '5. Everything, even minor changes')]), + preserve_default=True, + ), + ] diff --git a/django/econsensus/publicweb/tests/add_comments_test.py b/django/econsensus/publicweb/tests/add_comments_test.py index e2ab98fd..330f51cd 100644 --- a/django/econsensus/publicweb/tests/add_comments_test.py +++ b/django/econsensus/publicweb/tests/add_comments_test.py @@ -6,7 +6,7 @@ from mock import patch, MagicMock, Mock from custom_comments.forms import CustomCommentForm from django.utils.crypto import salted_hmac -from django.contrib.comments.models import Comment +from django_comments.models import Comment from django.test.client import RequestFactory import time from notification import models as notification diff --git a/django/econsensus/publicweb/tests/command_test.py b/django/econsensus/publicweb/tests/command_test.py index 286805a9..85f2027d 100644 --- a/django/econsensus/publicweb/tests/command_test.py +++ b/django/econsensus/publicweb/tests/command_test.py @@ -1,6 +1,6 @@ # pylint: disable=W0703 # W0703 - Too general exception -#Test commands that have been added to manage.py +# Test commands that have been added to manage.py import poplib import logging from email.mime.text import MIMEText @@ -10,7 +10,7 @@ from django.utils import timezone from django.contrib.auth.models import User from django.contrib.sites.models import Site -from django.contrib.comments.models import Comment +from django_comments.models import Comment from django.contrib.contenttypes.models import ContentType from organizations.models import Organization @@ -27,11 +27,11 @@ class CommandTest(EconsensusFixtureTestCase): poplib.POP3_SSL = dummy_poplib.POP3_SSL def test_process_email_new_proposal(self): - #Tests that process_email picks up mails from mailbox - #and creates objects in the db - poplib.POP3.mailbox = (([''], + # Tests that process_email picks up mails from mailbox + # and creates objects in the db + poplib.POP3.mailbox = (([''], [str('From: %s <%s>' % (self.betty, self.betty.email)), - str('To: %s <%s@econsensus.com>' % (self.bettysorg.name, + str('To: %s <%s@econsensus.com>' % (self.bettysorg.name, self.bettysorg.slug)), 'Subject: Proposal gleda raspored', '', @@ -47,13 +47,13 @@ def test_process_email_new_proposal(self): except: self.fail("Email failed to appear in database as a decision.") self.assertEqual(decision.status, Decision.PROPOSAL_STATUS) - + def test_process_email_basic_feedback(self): - #Tests that if [*] tag is in the header, a new feedback is created + # Tests that if [*] tag is in the header, a new feedback is created self.make_decision() count = Feedback.objects.count() email = getattr(mail, 'outbox')[-1] - poplib.POP3.mailbox = (([''], + poplib.POP3.mailbox = (([''], [str('From: %s <%s>' % (email.to, email.to)), str('To: %s <%s>' % (email.from_email, email.from_email)), str('Subject: Re: %s' % email.subject), @@ -65,17 +65,17 @@ def test_process_email_basic_feedback(self): self.fail("Exception was raised when processing legitimate email.") feedback = Feedback.objects.latest('id') - self.assertEqual(count+1, Feedback.objects.count()) + self.assertEqual(count + 1, Feedback.objects.count()) self.assertEqual(feedback.rating, Feedback.COMMENT_STATUS) self.assertEqual(feedback.description, "This is a good idea") def test_process_email_defined_feedback(self): - #Tests that if a defined feedback type is passed it is transformed - #into the rating field. + # Tests that if a defined feedback type is passed it is transformed + # into the rating field. self.make_decision() count = Feedback.objects.count() email = getattr(mail, 'outbox')[-1] - poplib.POP3.mailbox = (([''], + poplib.POP3.mailbox = (([''], [str('From: %s <%s>' % (email.to, email.to)), str('To: %s <%s>' % (email.from_email, email.from_email)), str('Subject: Re: %s' % email.subject), @@ -87,17 +87,17 @@ def test_process_email_defined_feedback(self): self.fail("Exception was raised when processing legitimate email.") feedback = Feedback.objects.latest('id') - self.assertEqual(count+1, Feedback.objects.count()) + self.assertEqual(count + 1, Feedback.objects.count()) self.assertEqual(feedback.rating, Feedback.DANGER_STATUS) self.assertEqual(feedback.description, "This is a bad idea") def test_process_email_unrecognised_feedback(self): - #Tests that if the user mistypes the feedback type it is ignored - #and the feedback defaults to comment + # Tests that if the user mistypes the feedback type it is ignored + # and the feedback defaults to comment self.make_decision() count = Feedback.objects.count() email = getattr(mail, 'outbox')[-1] - poplib.POP3.mailbox = (([''], + poplib.POP3.mailbox = (([''], [str('From: %s <%s>' % (email.to, email.to)), str('To: %s <%s>' % (email.from_email, email.from_email)), str('Subject: Re: %s' % email.subject), @@ -109,17 +109,17 @@ def test_process_email_unrecognised_feedback(self): self.fail("Exception was raised when processing legitimate email.") feedback = Feedback.objects.latest('id') - self.assertEqual(count+1, Feedback.objects.count()) + self.assertEqual(count + 1, Feedback.objects.count()) self.assertEqual(feedback.rating, Feedback.COMMENT_STATUS) self.assertEqual(feedback.description, "This is a bad idea") def test_process_email_empty_feedback(self): - #Tests that users can assign just the rating, leaving description blank - #and the feedback defaults to comment + # Tests that users can assign just the rating, leaving description blank + # and the feedback defaults to comment self.make_decision() count = Feedback.objects.count() email = getattr(mail, 'outbox')[-1] - poplib.POP3.mailbox = (([''], + poplib.POP3.mailbox = (([''], [str('From: %s <%s>' % (email.to, email.to)), str('To: %s <%s>' % (email.from_email, email.from_email)), str('Subject: Re: %s' % email.subject), @@ -131,16 +131,16 @@ def test_process_email_empty_feedback(self): self.fail("Exception was raised when processing legitimate email.") feedback = Feedback.objects.latest('id') - self.assertEqual(count+1, Feedback.objects.count()) + self.assertEqual(count + 1, Feedback.objects.count()) self.assertEqual(feedback.rating, Feedback.DANGER_STATUS) self.assertEqual(feedback.description, "") def test_process_email_reply_to_feedback_with_comment(self): - #Tests that a reply to a new feedback notification results in a new - #comment. - users_organizations = Organization.active.get_for_user(self.user) + # Tests that a reply to a new feedback notification results in a new + # comment. + users_organizations = Organization.active.get_for_user(self.user) NotificationSettings.objects.create( - user=self.user, + user=self.user, organization=users_organizations.latest('id'), notification_level=FEEDBACK_MAJOR_CHANGES ) @@ -149,8 +149,8 @@ def test_process_email_reply_to_feedback_with_comment(self): self.make_feedback(decision=decision) count = Comment.objects.count() email = getattr(mail, 'outbox')[-1] - user = User.objects.get(email=email.to[0]) - poplib.POP3.mailbox = (([''], + user = User.objects.get(email=email.to[0]) + poplib.POP3.mailbox = (([''], [str('From: %s <%s>' % (email.to[0], email.to[0])), str('To: %s <%s>' % (email.from_email, email.from_email)), str('Subject: Re: %s' % email.subject), @@ -159,14 +159,14 @@ def test_process_email_reply_to_feedback_with_comment(self): management.call_command('process_email') except: self.fail("Exception was raised when processing legitimate email.") - self.assertEqual(count + 1, Comment.objects.count(), + self.assertEqual(count + 1, Comment.objects.count(), "New comment failed to appear in database") comment = Comment.objects.latest('id') - + self.assertEqual(comment.comment, comment_body) self.assertEqual(comment.user_name, user.get_full_name()) self.assertEqual(comment.user_email, user.email) - + def test_process_email_reply_to_feedback_with_rating(self): ''' User replies to a feedback email with rating appear as Feedback @@ -176,12 +176,12 @@ def test_process_email_reply_to_feedback_with_rating(self): decision = self.make_decision() first_feedback = self.make_feedback(decision=decision) email = getattr(mail, 'outbox')[-1] - + rating_str = Feedback.RATING_CHOICES[Feedback.QUESTION_STATUS][1] description = 'Some description' - mail_body = str(rating_str.upper() +' : ' + description) - - poplib.POP3.mailbox = (([''], + mail_body = str(rating_str.upper() + ' : ' + description) + + poplib.POP3.mailbox = (([''], [str('From: %s <%s>' % (email.to, email.to)), str('To: %s <%s>' % (email.from_email, email.from_email)), str('Subject: Re: %s' % email.subject), @@ -197,12 +197,12 @@ def test_process_email_reply_to_feedback_with_rating(self): self.assertNotEqual(first_feedback.id, new_feedback.id) self.assertEqual(new_feedback.description, description) self.assertEqual(new_feedback.get_rating_display(), rating_str) - + def test_process_email_reply_to_comment_with_comment(self): - #Tests that a reply to a new comment notification results in a new comment if no rating supplied. + # Tests that a reply to a new comment notification results in a new comment if no rating supplied. NotificationSettings.objects.create( - user=self.user, + user=self.user, organization=Organization.active.get_for_user(self.user).latest('id'), notification_level=FEEDBACK_MAJOR_CHANGES ) @@ -211,14 +211,14 @@ def test_process_email_reply_to_comment_with_comment(self): feedback = self.make_feedback(decision=decision) feedback_type = ContentType.objects.get(app_label="publicweb", model="feedback") self.make_comment(user=self.user, - content_object=feedback, + content_object=feedback, object_pk=feedback.id, content_type=feedback_type, - submit_date = timezone.now(), - site = Site.objects.get_current()) + submit_date=timezone.now(), + site=Site.objects.get_current()) count = Comment.objects.count() email = getattr(mail, 'outbox')[-1] - poplib.POP3.mailbox = (([''], + poplib.POP3.mailbox = (([''], [str('From: %s <%s>' % (email.to, email.to)), str('To: %s <%s>' % (email.from_email, email.from_email)), str('Subject: Re: %s' % email.subject), @@ -231,7 +231,7 @@ def test_process_email_reply_to_comment_with_comment(self): self.assertEqual(count + 1, Comment.objects.count(), "New comment failed to appear in database") comment = Comment.objects.latest('id') self.assertEqual(comment.comment, comment_body) - + def test_process_email_reply_to_comment_with_rating(self): ''' @@ -243,18 +243,18 @@ def test_process_email_reply_to_comment_with_rating(self): first_feedback = self.make_feedback(decision=decision) feedback_type = ContentType.objects.get(app_label="publicweb", model="feedback") self.make_comment(user=self.user, - content_object=first_feedback, + content_object=first_feedback, object_pk=first_feedback.id, content_type=feedback_type, - submit_date = timezone.now(), - site = Site.objects.get_current()) + submit_date=timezone.now(), + site=Site.objects.get_current()) email = getattr(mail, 'outbox')[-1] - + rating_str = Feedback.RATING_CHOICES[Feedback.QUESTION_STATUS][1] description = 'Some description' - mail_body = str(rating_str.upper() +' : ' + description) - - poplib.POP3.mailbox = (([''], + mail_body = str(rating_str.upper() + ' : ' + description) + + poplib.POP3.mailbox = (([''], [str('From: %s <%s>' % (email.to, email.to)), str('To: %s <%s>' % (email.from_email, email.from_email)), str('Subject: Re: %s' % email.subject), @@ -274,20 +274,20 @@ def test_process_email_reply_to_comment_with_rating(self): def test_process_email_bad_content(self): initial_count = Decision.objects.count() - #Test that an unknown email address is rejected. - poplib.POP3.mailbox = (([''], + # Test that an unknown email address is rejected. + poplib.POP3.mailbox = (([''], ['From: Secret ', - str('To: %s <%s@econsensus.com>' % (self.bettysorg.name, + str('To: %s <%s@econsensus.com>' % (self.bettysorg.name, self.bettysorg.slug)), 'Subject: gleda Issue #54', '', 'Mnogi programi za stolno izdavatvo', ''], ['']),) self.assertFalse(Decision.objects.count() - initial_count) - - #Test that a corrupt from field is rejected. - poplib.POP3.mailbox = (([''], + + # Test that a corrupt from field is rejected. + poplib.POP3.mailbox = (([''], ['From: Donald ', - str('To: %s <%s@econsensus.com>' % (self.bettysorg.name, + str('To: %s <%s@econsensus.com>' % (self.bettysorg.name, self.bettysorg.slug)), 'Subject: Re: [8] New decision', '', @@ -295,9 +295,9 @@ def test_process_email_bad_content(self): self.assertFalse(Decision.objects.count() - initial_count) def test_email_sent_out_on_email_decision(self): - poplib.POP3.mailbox = (([''], + poplib.POP3.mailbox = (([''], [str('From: %s <%s>' % (self.betty, self.betty.email)), - str('To: self.bettysorg.name <%s@econsensus.com>' % + str('To: self.bettysorg.name <%s@econsensus.com>' % self.bettysorg.slug), 'Subject: Proposal gleda raspored', '', @@ -306,7 +306,7 @@ def test_email_sent_out_on_email_decision(self): management.call_command('process_email') except Exception, e: self.fail("Exception: %s" % e) - + outbox = getattr(mail, 'outbox') self.assertTrue(outbox) @@ -322,23 +322,23 @@ def test_email_replies_are_chevron_stripped(self): """ msg = MIMEText(payload) msg['Subject'] = 'Proposal gleda raspored' - + msg['From'] = self.betty.email msg['To'] = '%s@econsensus.com>' % self.bettysorg.slug - + poplib.POP3.mailbox = (([''], [msg.as_string()], ['']),) try: management.call_command('process_email') except Exception, e: self.fail("Exception: %s" % e) - + try: decision = Decision.objects.latest('id') except: self.fail("Email failed to appear in database as a decision.") self.assertNotIn("Some quoted text.", decision.description) self.assertIn("Unquoted text.", decision.description) - + def test_email_replies_are_quote_header_stripped(self): """ Replies should have the 'header' of a quote removed. @@ -360,14 +360,14 @@ def test_email_replies_are_quote_header_stripped(self): management.call_command('process_email') except Exception, e: self.fail("Exception: %s" % e) - + try: decision = Decision.objects.latest('id') except: self.fail("Email failed to appear in database as a decision.") self.assertNotIn("On 24/07/12 18:14, Mark Skipper wrote:", decision.description) self.assertIn("Proposal XYZ", decision.description) - + def test_multipart_mail(self): """Ensure that the command can process multipart emails.""" msg = MIMEMultipart() @@ -385,7 +385,7 @@ def test_multipart_mail(self): management.call_command('process_email') except Exception, e: self.fail("Exception: %s" % e) - + try: Decision.objects.latest('id') except: @@ -398,16 +398,16 @@ def test_membership_checked_against_decision_id(self): that decision and not (just) the email representing the organization. """ - #create an organization decision that Betty shouldn't be able to access + # create an organization decision that Betty shouldn't be able to access logging.disable(logging.CRITICAL) non_member_organization = Organization.objects.exclude(users=self.user).latest('id') self.make_decision(organization=non_member_organization) - #Betty tries to spoof something onto that decision - #by posting to her own organization but using the original decision id + # Betty tries to spoof something onto that decision + # by posting to her own organization but using the original decision id email = getattr(mail, 'outbox')[-1] mail_to = '%s@econsensus.com>' % self.bettysorg.slug - poplib.POP3.mailbox = (([''], + poplib.POP3.mailbox = (([''], [str('From: %s <%s>' % (self.betty.email, self.betty.email)), str('To: %s <%s>' % (mail_to, mail_to)), str('Subject: Re: %s' % email.subject), @@ -418,126 +418,126 @@ def test_membership_checked_against_decision_id(self): except: self.fail("Exception was raised when processing legitimate email.") - #the email should be rejected and no feedback should be created. + # the email should be rejected and no feedback should be created. self.assertFalse(Feedback.objects.all()) - + def test_emails_with_precedence_bulk_header_are_ignored(self): old_proposals = list(Decision.objects.all()) mail.outbox = [] payload = "Sample payload" - + # This message is legitimate except for the precedence header. - # An exception is not expected when processing it. + # An exception is not expected when processing it. msg = MIMEText(payload) msg['Subject'] = 'Proposal gleda raspored' msg['From'] = self.betty.email msg['To'] = '%s@econsensus.com>' % self.bettysorg.slug msg['Precedence'] = 'bulk' - + poplib.POP3.mailbox = (([''], [msg.as_string()], ['']),) - + try: management.call_command('process_email') except Exception, e: self.fail("Exception: %s" % e) - + self.assertListEqual(old_proposals, list(Decision.objects.all())) self.assertListEqual([], mail.outbox) - + def test_emails_with_precedence_auto_reply_header_are_ignored(self): old_proposals = list(Decision.objects.all()) mail.outbox = [] payload = "Sample payload" - + # This message is legitimate except for the precedence header. - # An exception is not expected when processing it. + # An exception is not expected when processing it. msg = MIMEText(payload) msg['Subject'] = 'Proposal gleda raspored' msg['From'] = self.betty.email msg['To'] = '%s@econsensus.com>' % self.bettysorg.slug msg['Precedence'] = 'auto_reply' - + poplib.POP3.mailbox = (([''], [msg.as_string()], ['']),) - + try: management.call_command('process_email') except Exception, e: self.fail("Exception: %s" % e) - + self.assertListEqual(old_proposals, list(Decision.objects.all())) self.assertListEqual([], mail.outbox) - + def test_emails_sent_after_messages_with_bulk_header_are_processed(self): expected_proposals = list(Decision.objects.all()) mail.outbox = [] payload = "Sample payload" - + # This message is legitimate except for the precedence header. - # An exception is not expected when processing it. + # An exception is not expected when processing it. msg1 = MIMEText("%s1" % payload) msg1['Subject'] = 'Proposal gleda raspored' msg1['From'] = self.betty.email msg1['To'] = '%s@econsensus.com>' % self.bettysorg.slug msg1['Precedence'] = 'bulk' - + msg2 = MIMEText("%s2" % payload) msg2['Subject'] = 'Proposal gleda raspored' msg2['From'] = self.betty.email msg2['To'] = '%s@econsensus.com>' % self.bettysorg.slug - - # The mailbox format is (response, [message], octets) - poplib.POP3.mailbox = (([''], - [msg1.as_string()], + + # The mailbox format is (response, [message], octets) + poplib.POP3.mailbox = (([''], + [msg1.as_string()], ['']), - ([''], - [msg2.as_string()], + ([''], + [msg2.as_string()], ['']),) - - + + try: management.call_command('process_email') except Exception, e: self.fail("Exception: %s" % e) - + new_decision = Decision.objects.get(description=("%s2" % payload)) expected_proposals.append(new_decision) - + self.assertListEqual(expected_proposals, list(Decision.objects.all())) - + def test_email_without_precedence_header_isnt_treated_as_auto_reply(self): payload = "Sample payload" - + # This message is legitimate except for the precedence header. - # An exception is not expected when processing it. + # An exception is not expected when processing it. msg1 = MIMEText("%s1" % payload) msg1['Subject'] = 'Proposal gleda raspored' msg1['From'] = self.betty.email msg1['To'] = '%s@econsensus.com>' % self.bettysorg.slug self.assertFalse(is_autoreply(msg1)) - + def test_email_with_precedence_header_bulk_is_treated_as_auto_reply(self): payload = "Sample payload" - + # This message is legitimate except for the precedence header. - # An exception is not expected when processing it. + # An exception is not expected when processing it. msg1 = MIMEText("%s1" % payload) msg1['Subject'] = 'Proposal gleda raspored' msg1['From'] = self.betty.email msg1['To'] = '%s@econsensus.com>' % self.bettysorg.slug msg1['Precedence'] = 'bulk' - + self.assertTrue(is_autoreply(msg1)) - + def test_email_with_precedence_header_auto_reply_is_treated_as_auto_reply(self): payload = "Sample payload" - + # This message is legitimate except for the precedence header. - # An exception is not expected when processing it. + # An exception is not expected when processing it. msg1 = MIMEText("%s1" % payload) msg1['Subject'] = 'Proposal gleda raspored' msg1['From'] = self.betty.email msg1['To'] = '%s@econsensus.com>' % self.bettysorg.slug msg1['Precedence'] = 'auto_reply' - - self.assertTrue(is_autoreply(msg1)) \ No newline at end of file + + self.assertTrue(is_autoreply(msg1)) diff --git a/django/econsensus/publicweb/tests/factories.py b/django/econsensus/publicweb/tests/factories.py index 5cc68423..8e199e8b 100644 --- a/django/econsensus/publicweb/tests/factories.py +++ b/django/econsensus/publicweb/tests/factories.py @@ -1,14 +1,14 @@ import factory from django.contrib.auth.models import User -from django.contrib.comments.models import Comment +from django_comments.models import Comment from django.contrib.sites.models import Site from organizations.models import (Organization, OrganizationUser, OrganizationOwner) -from publicweb.models import Decision, Feedback -from notification.models import (ObservedItem, NoticeType, +from publicweb.models import Decision, Feedback +from notification.models import (ObservedItem, NoticeType, NOTICE_MEDIA_DEFAULTS, NOTICE_MEDIA) from publicweb.extra_models import (NotificationSettings, MAIN_ITEMS_NOTIFICATIONS_ONLY) @@ -64,10 +64,10 @@ class NotificationSettingsFactory(factory.DjangoModelFactory): class NoticeTypeFactory(factory.DjangoModelFactory): FACTORY_FOR = NoticeType default = NOTICE_MEDIA_DEFAULTS[NOTICE_MEDIA[0][0]] - + class ObservedItemFactory(factory.DjangoModelFactory): FACTORY_FOR = ObservedItem - + user = factory.SubFactory(UserFactory) observed_object = factory.SubFactory(DecisionFactory) notice_type = factory.SubFactory(NoticeTypeFactory) diff --git a/django/econsensus/publicweb/tests/open_consent_test_case.py b/django/econsensus/publicweb/tests/open_consent_test_case.py index 7cdadbb6..a479c966 100644 --- a/django/econsensus/publicweb/tests/open_consent_test_case.py +++ b/django/econsensus/publicweb/tests/open_consent_test_case.py @@ -4,7 +4,8 @@ from django.db.models.fields import FieldDoesNotExist from django.contrib.admin.options import ModelAdmin from django.contrib.admin.sites import AdminSite -from django.contrib.comments import Comment, signals +from django_comments.models import Comment +from django_comments import signals from django.contrib.sites.models import Site from django.utils import timezone @@ -48,7 +49,7 @@ def make_decision(self, **kwargs): required = {'description': 'Default description text', 'organization': Organization.active.get_for_user(self.user).latest('id'), 'status': Decision.PROPOSAL_STATUS} - for (key,value) in required.items(): + for (key, value) in required.items(): if key not in kwargs.keys(): kwargs[key] = value return self.make_model_instance(Decision, **kwargs) @@ -58,7 +59,7 @@ def make_feedback(self, **kwargs): 'resolved': False, 'author': self.user, 'rating': Feedback.DANGER_STATUS} - for (key,value) in required.items(): + for (key, value) in required.items(): if key not in kwargs.keys(): kwargs[key] = value return self.make_model_instance(Feedback, **kwargs) @@ -68,26 +69,26 @@ def make_comment(self, **kwargs): 'user': self.user, 'submit_date': timezone.now(), 'site':Site.objects.get_current()} - for (key,value) in required.items(): + for (key, value) in required.items(): if key not in kwargs.keys(): kwargs[key] = value - + comment = self.make_model_instance(Comment, **kwargs) del kwargs['comment'] self.send_comment_posted_signal(comment, **kwargs) return comment - + def send_comment_posted_signal(self, comment, **kwargs): request = RequestFactory().post('/', kwargs) - signals.comment_was_posted.send(Comment, + signals.comment_was_posted.send(Comment, request=request, comment=comment) def make_model_instance(self, model, **kwargs): instance = model() - for (key,value) in kwargs.items(): + for (key, value) in kwargs.items(): try: instance._meta.get_field(key) - setattr(instance,key,value) + setattr(instance, key, value) except FieldDoesNotExist: pass instance.full_clean() @@ -104,7 +105,7 @@ def create_decision_through_browser(self): return Decision.objects.get(description=description) def update_decision_through_browser(self, idd, - description = 'Aenean eros nibh'): + description='Aenean eros nibh'): path = reverse('publicweb_decision_update', args=[idd]) post_dict = {'description': description, 'status': Decision.PROPOSAL_STATUS, @@ -123,7 +124,7 @@ def create_feedback_through_browser(self, idd, watch=True): return Feedback.objects.get(description=description) def update_feedback_through_browser(self, idd, - description = 'nibh ut dignissim. Sed a aliquet quam', watch=True): + description='nibh ut dignissim. Sed a aliquet quam', watch=True): path = reverse('publicweb_feedback_update', args=[idd]) post_dict = {'description': description, 'rating': Feedback.COMMENT_STATUS} diff --git a/django/econsensus/publicweb/tests/templatetags_test.py b/django/econsensus/publicweb/tests/templatetags_test.py index 90b2d8ed..a1877249 100644 --- a/django/econsensus/publicweb/tests/templatetags_test.py +++ b/django/econsensus/publicweb/tests/templatetags_test.py @@ -1,14 +1,14 @@ -from django.contrib.comments.models import Comment +from django_comments.models import Comment from django.test import TestCase from publicweb.templatetags import publicweb_filters -from publicweb.tests.factories import UserFactory, ObservedItemFactory,\ +from publicweb.tests.factories import UserFactory, ObservedItemFactory, \ DecisionFactory, OrganizationFactory, NoticeTypeFactory from mock import MagicMock from publicweb.templatetags.publicweb_filters import is_watching class CustomTemplateFilterTest(TestCase): - + def test_get_user_name_from_comment(self): comment = Comment(user=None, user_name='') self.assertEqual(publicweb_filters.get_user_name_from_comment(comment), "An Anonymous Contributor") @@ -25,32 +25,32 @@ def test_get_user_name_for_notification(self): user.first_name = "Robert" user.last_name = "Bins" self.assertEquals("Robert Bins", publicweb_filters.get_user_name_for_notification(user)) - + def test_is_watched_returns_true_if_user_in_watchers_list(self): user_1 = UserFactory.build(id=1) user_2 = UserFactory.build(id=2) decision = DecisionFactory.build(organization=OrganizationFactory.build()) notice_type = NoticeTypeFactory.build() - observed_item_1 = ObservedItemFactory.build(user=user_1, + observed_item_1 = ObservedItemFactory.build(user=user_1, observed_object=decision, notice_type=notice_type) - observed_item_2 = ObservedItemFactory.build(user=user_2, + observed_item_2 = ObservedItemFactory.build(user=user_2, observed_object=decision, notice_type=notice_type) - + mock_item = MagicMock() mock_item.watchers.all = lambda: [observed_item_1, observed_item_2] self.assertTrue(is_watching(user_1, mock_item)) - + def test_is_watched_returns_false_if_user_not_in_watchers_list(self): user_1 = UserFactory.build(id=1) user_2 = UserFactory.build(id=2) user_3 = UserFactory.build(id=3) decision = DecisionFactory.build(organization=OrganizationFactory.build()) notice_type = NoticeTypeFactory.build() - observed_item_1 = ObservedItemFactory.build(user=user_1, + observed_item_1 = ObservedItemFactory.build(user=user_1, observed_object=decision, notice_type=notice_type) - observed_item_2 = ObservedItemFactory.build(user=user_2, + observed_item_2 = ObservedItemFactory.build(user=user_2, observed_object=decision, notice_type=notice_type) - + mock_item = MagicMock() mock_item.watchers.all = lambda: [observed_item_1, observed_item_2] self.assertFalse(is_watching(user_3, mock_item)) diff --git a/django/econsensus/test_runner.py b/django/econsensus/test_runner.py index eac67be2..0e7961a3 100644 --- a/django/econsensus/test_runner.py +++ b/django/econsensus/test_runner.py @@ -1,6 +1,5 @@ from django.core.exceptions import ImproperlyConfigured -from django.test.simple import DjangoTestSuiteRunner, \ - reorder_suite, build_suite +from django.test.runner import DiscoverRunner, reorder_suite from django.test.testcases import TestCase from django.db.models import get_apps from django.utils.importlib import import_module @@ -16,7 +15,7 @@ "or install the unittest2 library.") -class DiscoveryRunner(DjangoTestSuiteRunner): +class DiscoveryRunner(DiscoverRunner): """ A test suite runner combining default django behavior with the smart test discovery of djano-discover-runner. With snippets taken from carljm From eb6c286da794e7f94122bf5cde09b34adc1cc089 Mon Sep 17 00:00:00 2001 From: Daniel Levy Date: Fri, 12 Jun 2015 16:16:05 +0100 Subject: [PATCH 5/5] Update django to version 1.7 --- django/econsensus/publicweb/forms.py | 10 ++++++-- .../commands/waffles_need_initializing.py | 2 +- .../tests/actionitems_detail_test.py | 2 +- .../publicweb/tests/actionitems_view_test.py | 2 +- .../publicweb/tests/add_decision_test.py | 10 ++++---- django/econsensus/publicweb/tests/csv_test.py | 12 +++++----- .../publicweb/tests/decision_list_test.py | 4 ++-- .../publicweb/tests/decisions_test.py | 3 ++- .../econsensus/publicweb/tests/html_test.py | 10 ++++---- .../tests/management_command_waffle_test.py | 2 +- django/econsensus/publicweb/tests/tag_test.py | 23 +++++++++---------- django/econsensus/publicweb/views.py | 2 +- 12 files changed, 44 insertions(+), 38 deletions(-) diff --git a/django/econsensus/publicweb/forms.py b/django/econsensus/publicweb/forms.py index ac802872..455795d9 100644 --- a/django/econsensus/publicweb/forms.py +++ b/django/econsensus/publicweb/forms.py @@ -1,7 +1,6 @@ # Create your forms here. from django import forms -from models import Decision, Feedback from django.contrib.auth.models import User @@ -15,9 +14,12 @@ additional_message_required, send_decision_notifications from parsley.decorators import parsleyfy + from actionitems.forms import ActionItemCreateForm, ActionItemUpdateForm +from notification.models import ObservedItem from publicweb.extra_models import MAIN_ITEMS_NOTIFICATIONS_ONLY -from actionitems.models import ActionItem + +from models import Decision, Feedback class YourDetailsForm(forms.ModelForm): @@ -41,6 +43,10 @@ def clean_email(self): class NotificationsForm(forms.ModelForm): + class Meta: + model = ObservedItem + fields = () + watch = forms.BooleanField( required=False, label=_("Watch this conversation"), diff --git a/django/econsensus/publicweb/management/commands/waffles_need_initializing.py b/django/econsensus/publicweb/management/commands/waffles_need_initializing.py index c20d1dcf..ffcc5196 100644 --- a/django/econsensus/publicweb/management/commands/waffles_need_initializing.py +++ b/django/econsensus/publicweb/management/commands/waffles_need_initializing.py @@ -1,4 +1,4 @@ -from waffle import Switch, Flag, Sample +from waffle.models import Switch, Flag, Sample from django.core.management.base import BaseCommand diff --git a/django/econsensus/publicweb/tests/actionitems_detail_test.py b/django/econsensus/publicweb/tests/actionitems_detail_test.py index 9c2f1e47..b4524936 100644 --- a/django/econsensus/publicweb/tests/actionitems_detail_test.py +++ b/django/econsensus/publicweb/tests/actionitems_detail_test.py @@ -1,7 +1,7 @@ from django.test.client import RequestFactory from django_dynamic_fixture import G from django.contrib.auth.models import AnonymousUser -from waffle import Switch +from waffle.models import Switch from actionitems.models import ActionItem diff --git a/django/econsensus/publicweb/tests/actionitems_view_test.py b/django/econsensus/publicweb/tests/actionitems_view_test.py index a3d618a2..3dd4c1c3 100644 --- a/django/econsensus/publicweb/tests/actionitems_view_test.py +++ b/django/econsensus/publicweb/tests/actionitems_view_test.py @@ -3,7 +3,7 @@ from django.core.urlresolvers import reverse, resolve from django.contrib.auth.models import User from BeautifulSoup import BeautifulSoup -from waffle import Switch +from waffle.models import Switch from decision_test_case import DecisionTestCase diff --git a/django/econsensus/publicweb/tests/add_decision_test.py b/django/econsensus/publicweb/tests/add_decision_test.py index 8b58cc9c..55cbe0b4 100644 --- a/django/econsensus/publicweb/tests/add_decision_test.py +++ b/django/econsensus/publicweb/tests/add_decision_test.py @@ -2,13 +2,13 @@ from decision_test_case import DecisionTestCase class AddDecisionTest(DecisionTestCase): - + def test_jquery_javascript_included_in_page(self): response = self.load_add_decision_and_return_response() - + self.assertContains(response, "jquery.min.js") self.assertContains(response, "jquery-ui.min.js") - + def test_jquery_css_included_in_page(self): response = self.load_add_decision_and_return_response() self.assertContains(response, "jquery-ui.css") @@ -16,11 +16,11 @@ def test_jquery_css_included_in_page(self): def test_add_description_form_doesnt_ask_for_name(self): response = self.load_add_decision_and_return_response() self.assertNotContains(response, "id_short_name") - + def load_add_decision_and_return_response(self): request = self.factory.request() request.user = self.betty kwargs = {'org_slug':self.bettysorg.slug} - response = DecisionCreate(template_name='decision_update_page.html').dispatch(request, **kwargs) + response = DecisionCreate.as_view(template_name='decision_update_page.html')(request, **kwargs) rendered_response = response.render() return rendered_response diff --git a/django/econsensus/publicweb/tests/csv_test.py b/django/econsensus/publicweb/tests/csv_test.py index e35f8ede..10d06430 100644 --- a/django/econsensus/publicweb/tests/csv_test.py +++ b/django/econsensus/publicweb/tests/csv_test.py @@ -1,7 +1,7 @@ """ Tests for the csv export functionality -TODO: Check that when you add or update a decision it is reflected in the output. +TODO: Check that when you add or update a decision it is reflected in the output. """ from open_consent_test_case import EconsensusFixtureTestCase @@ -23,23 +23,23 @@ def test_export_csv_not_logged_in(self): path = reverse('publicweb_export_csv', args=(self.test_user_org.slug,)) response = self.client.get(path) self.assertEquals(response.status_code, 302) - self.assertTrue(response.get('Location','').find( + self.assertTrue(response.get('Location', '').find( 'login/?next=/%s/export_csv' % self.test_user_org.slug) >= 0) def test_export_csv_for_test_user_org(self): - self.login(self.test_user) + self.login(self.test_user.username) path = reverse('publicweb_export_csv', args=(self.test_user_org.slug,)) response = self.client.get(path) self.assertEquals(response.status_code, 200) self.assertEquals( - response['Content-Disposition'], + response['Content-Disposition'], 'attachment; filename=econsensus_decision_data_%s.csv' % self.test_user_org.slug ) - self.assertEquals(response['Content-Type'], 'text/csv') + self.assertEquals(response['Content-Type'], 'text/csv') self.assertTrue(len(response.content) > 0) def test_export_csv_for_other_org(self): - self.login(self.test_user) + self.login(self.test_user.username) path = reverse('publicweb_export_csv', args=(self.other_org.slug,)) response = self.client.get(path) self.assertEquals(response.status_code, 403) diff --git a/django/econsensus/publicweb/tests/decision_list_test.py b/django/econsensus/publicweb/tests/decision_list_test.py index 4795ff6f..294cbbb5 100644 --- a/django/econsensus/publicweb/tests/decision_list_test.py +++ b/django/econsensus/publicweb/tests/decision_list_test.py @@ -89,7 +89,7 @@ def test_list_pages_can_be_sorted(self): last_modifieds = [decision.last_modified for decision in decisions] ids = [decision.id for decision in decisions] feedbackcounts = [decision.feedbackcount() for decision in decisions] - excerpts = [decision.excerpt for decision in decisions] + excerpts = [unicode(decision.excerpt) for decision in decisions] ############################# # we need sorted values to compare against @@ -197,7 +197,7 @@ def test_pagination_build_query_string(self): class DummyPageObject: def __init__(self, **kwargs): self.__dict__.update(kwargs) - page_obj = DummyPageObject(previous_page_number=lambda: 2, next_page_number=lambda: 4) + page_obj = DummyPageObject(previous_page_number=lambda: 2, number=3, next_page_number=lambda: 4) test_cases = [{'name': 'Test A', 'page_obj': page_obj, 'context': {'num': default_num, 'sort': default_sort}, 'expectedprev': '?page=2', 'expectednext': '?page=4'}, {'name': 'Test B', 'page_obj': page_obj, 'context': {'num': default_num, 'sort': 'excerpt'}, 'expectedprev': '?sort=excerpt&page=2', 'expectednext': '?sort=excerpt&page=4'}, diff --git a/django/econsensus/publicweb/tests/decisions_test.py b/django/econsensus/publicweb/tests/decisions_test.py index f8896fa3..41ccee16 100644 --- a/django/econsensus/publicweb/tests/decisions_test.py +++ b/django/econsensus/publicweb/tests/decisions_test.py @@ -60,12 +60,12 @@ def test_add_decision(self): post_dict.update({ 'description': 'Make Eggs', 'watch': False, + 'minor_edit': False, 'submit': "Submit"}) response = self.client.post(path, post_dict, follow=True) - self.assertRedirects( response, reverse('publicweb_item_list', args=[self.bettysorg.slug, post_dict['status']])) @@ -124,6 +124,7 @@ def get_edit_decision_response(self, decision): 'feedback_set-TOTAL_FORMS': '3', 'feedback_set-INITIAL_FORMS': '0', 'feedback_set-MAX_NUM_FORMS': '', + 'minor_edit': False } response = self.client.post(path, post_dict) return response diff --git a/django/econsensus/publicweb/tests/html_test.py b/django/econsensus/publicweb/tests/html_test.py index 24225aed..02e8b4fe 100644 --- a/django/econsensus/publicweb/tests/html_test.py +++ b/django/econsensus/publicweb/tests/html_test.py @@ -127,7 +127,7 @@ def test_meeting_people_not_shown_for_proposal(self): path = reverse('publicweb_item_detail', args=[proposal.id]) response = self.client.get(path) self.assertNotContains(response, test_string) - + def test_h2_header_on_form_matches_selected_status(self): path = reverse('publicweb_decision_create', args=[self.bettysorg.slug, Decision.PROPOSAL_STATUS]) response = self.client.get(path) @@ -169,11 +169,11 @@ def test_cannot_view_decisions_when_not_member(self): decision = self.make_decision() kwargs = {'org_slug' : decision.organization.slug, 'status': decision.status} - response = DecisionList(template_name='decision_list.html').dispatch(request, **kwargs) + response = DecisionList.as_view(template_name='decision_list.html')(request, **kwargs) self.assertContains(response, decision.description) kwargs = {'pk' : decision.pk} - response = DecisionDetail(template_name='item_detail.html').dispatch(request, **kwargs) + response = DecisionDetail.as_view(template_name='item_detail.html')(request, **kwargs) self.assertContains(response, decision.description) members = [x.username for x in decision.organization.users.all()] @@ -184,9 +184,9 @@ def test_cannot_view_decisions_when_not_member(self): request.user = self.user kwargs = {'org_slug' : decision.organization.slug, 'status': decision.status} - response = DecisionList(template_name='decision_list.html').dispatch(request, **kwargs) + response = DecisionList.as_view(template_name='decision_list.html')(request, **kwargs) self.assertNotContains(response, decision.description) kwargs = { 'pk' : decision.pk } - response = DecisionDetail(template_name='item_detail.html').dispatch(request, **kwargs) + response = DecisionDetail.as_view(template_name='item_detail.html')(request, **kwargs) self.assertNotContains(response, decision.description) diff --git a/django/econsensus/publicweb/tests/management_command_waffle_test.py b/django/econsensus/publicweb/tests/management_command_waffle_test.py index 9ea5f43a..2ae000c8 100644 --- a/django/econsensus/publicweb/tests/management_command_waffle_test.py +++ b/django/econsensus/publicweb/tests/management_command_waffle_test.py @@ -3,7 +3,7 @@ from django.core import management -from waffle import Switch, Flag, Sample +from waffle.models import Switch, Flag, Sample from publicweb.tests.open_consent_test_case import EconsensusFixtureTestCase diff --git a/django/econsensus/publicweb/tests/tag_test.py b/django/econsensus/publicweb/tests/tag_test.py index 206c71a9..e1ad3162 100644 --- a/django/econsensus/publicweb/tests/tag_test.py +++ b/django/econsensus/publicweb/tests/tag_test.py @@ -8,7 +8,7 @@ from decision_test_case import DecisionTestCase -#TODO: paths should not be hard coded in test code. +# TODO: paths should not be hard coded in test code. class TagsTest(DecisionTestCase): def test_tag_can_be_created(self): @@ -20,35 +20,34 @@ def test_tag_can_be_created(self): 'status': Decision.PROPOSAL_STATUS, 'feedback_set-TOTAL_FORMS': '3', 'feedback_set-INITIAL_FORMS': '0', - 'feedback_set-MAX_NUM_FORMS': '', + 'feedback_set-MAX_NUM_FORMS': '', 'submit': 'Save' } self.client.post(path, data) decision = Decision.objects.get(description='A description.') self.assertEqual("a_tag", decision.tags) - + def test_form_has_tags(self): decision_form = DecisionForm() self.assertTrue("tags" in decision_form.fields, "Decision form does not contain tags entry") - + self.assertEquals(TagField, type(decision_form.fields["tags"]), "Decision form tags is not a TagField") - + self.assertEquals(TextInput, type(decision_form.fields["tags"].widget), "Decision form tags is not a TextInput widget") - - def test_tags_field_appears_on_page(self): + + def test_tags_field_appears_on_page(self): path = reverse('publicweb_decision_create', args=[self.bettysorg.slug, Decision.PROPOSAL_STATUS]) response = self.client.get(path) - self.assertContains(response, "input id=\"id_tags\"") - - def test_page_contains_tags_field_help_text_appears_on_page(self): + self.assertRegexpMatches(response.content, "input.*id=\"id_tags\"") + + def test_page_contains_tags_field_help_text_appears_on_page(self): path = reverse('publicweb_decision_create', args=[self.bettysorg.slug, Decision.PROPOSAL_STATUS]) response = self.client.get(path) self.assertContains(response, Decision.TAGS_HELP_FIELD_TEXT) - - \ No newline at end of file + diff --git a/django/econsensus/publicweb/views.py b/django/econsensus/publicweb/views.py index 0760efeb..82147fa8 100644 --- a/django/econsensus/publicweb/views.py +++ b/django/econsensus/publicweb/views.py @@ -77,7 +77,7 @@ def get(self, request, *args, **kwargs): as CSV. ''' - response = HttpResponse(mimetype='text/csv') + response = HttpResponse(content_type='text/csv') response['Content-Disposition'] = ('attachment; ' 'filename=econsensus_decision_data_%s.csv' % unicode(self.organization.slug))