diff --git a/docs/changelog.rst b/docs/changelog.rst index 099a067..7f82ab1 100644 --- a/docs/changelog.rst +++ b/docs/changelog.rst @@ -1,6 +1,11 @@ Changelog ========= +* :release:`0.2.1 <2014-12-17>` +* :support:`-` update Django to 1.7.1, update other dependencies, drop South +* :bug:`-` wrap :py:meth:`ousers.models.UserManager.create_user` in + transaction.atomic + * :release:`0.2.0 <2014-06-01>` * :feature:`-` full test suite for osusers * :feature:`-` full test suite for managemails app diff --git a/docs/conf.py b/docs/conf.py index 3a6ad3a..6b5720c 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -55,9 +55,9 @@ copyright = u'2014, Jan Dittberner' # built documents. # # The short X.Y version. -version = '0.2.0' +version = '0.2.1' # The full version, including alpha/beta/rc tags. -release = '0.2.0' +release = '0.2.1' # The language for content autogenerated by Sphinx. Refer to documentation # for a list of supported languages. diff --git a/gnuviechadmin/domains/migrations/0001_initial.py b/gnuviechadmin/domains/migrations/0001_initial.py index 25f8e74..a38fce2 100644 --- a/gnuviechadmin/domains/migrations/0001_initial.py +++ b/gnuviechadmin/domains/migrations/0001_initial.py @@ -1,36 +1,29 @@ # -*- coding: utf-8 -*- -from south.utils import datetime_utils as datetime -from south.db import db -from south.v2 import SchemaMigration -from django.db import models +from __future__ import unicode_literals + +from django.db import models, migrations +import django.utils.timezone +import model_utils.fields -class Migration(SchemaMigration): +class Migration(migrations.Migration): - def forwards(self, orm): - # Adding model 'MailDomain' - db.create_table(u'domains_maildomain', ( - (u'id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), - ('created', self.gf('model_utils.fields.AutoCreatedField')(default=datetime.datetime.now)), - ('modified', self.gf('model_utils.fields.AutoLastModifiedField')(default=datetime.datetime.now)), - ('domain', self.gf('django.db.models.fields.CharField')(unique=True, max_length=128)), - )) - db.send_create_signal(u'domains', ['MailDomain']) + dependencies = [ + ] - - def backwards(self, orm): - # Deleting model 'MailDomain' - db.delete_table(u'domains_maildomain') - - - models = { - u'domains.maildomain': { - 'Meta': {'object_name': 'MailDomain'}, - 'created': ('model_utils.fields.AutoCreatedField', [], {'default': 'datetime.datetime.now'}), - 'domain': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '128'}), - u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'modified': ('model_utils.fields.AutoLastModifiedField', [], {'default': 'datetime.datetime.now'}) - } - } - - complete_apps = ['domains'] \ No newline at end of file + operations = [ + migrations.CreateModel( + name='MailDomain', + fields=[ + ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), + ('created', model_utils.fields.AutoCreatedField(default=django.utils.timezone.now, verbose_name='created', editable=False)), + ('modified', model_utils.fields.AutoLastModifiedField(default=django.utils.timezone.now, verbose_name='modified', editable=False)), + ('domain', models.CharField(unique=True, max_length=128)), + ], + options={ + 'verbose_name': 'Mail domain', + 'verbose_name_plural': 'Mail domains', + }, + bases=(models.Model,), + ), + ] diff --git a/gnuviechadmin/gnuviechadmin/settings/base.py b/gnuviechadmin/gnuviechadmin/settings/base.py index 2b1322f..c871d84 100644 --- a/gnuviechadmin/gnuviechadmin/settings/base.py +++ b/gnuviechadmin/gnuviechadmin/settings/base.py @@ -199,6 +199,11 @@ ROOT_URLCONF = '%s.urls' % SITE_NAME ########## END URL CONFIGURATION +########## TEST RUNNER CONFIGURATION +TEST_RUNNER = 'django.test.runner.DiscoverRunner' +########## END TEST RUNNER CONFIGURATION + + ########## APP CONFIGURATION DJANGO_APPS = ( # Default Django apps: @@ -268,17 +273,6 @@ WSGI_APPLICATION = '%s.wsgi.application' % SITE_NAME ########## END WSGI CONFIGURATION -########## SOUTH CONFIGURATION -# See: http://south.readthedocs.org/en/latest/installation.html#configuring-your-django-installation -INSTALLED_APPS += ( - # Database migration helpers: - 'south', -) -# Don't need to use South when setting up a test database. -SOUTH_TESTS_MIGRATE = False -########## END SOUTH CONFIGURATION - - ########## CELERY CONFIGURATION BROKER_URL = get_env_variable('GVA_BROKER_URL') CELERY_RESULT_BACKEND = 'amqp' diff --git a/gnuviechadmin/managemails/admin.py b/gnuviechadmin/managemails/admin.py index 6cebe05..d74fcba 100644 --- a/gnuviechadmin/managemails/admin.py +++ b/gnuviechadmin/managemails/admin.py @@ -138,7 +138,7 @@ class MailboxAdmin(ActivationChangeMixin, admin.ModelAdmin): if obj is None: defaults.update({ 'form': self.add_form, - 'fields': admin.util.flatten_fieldsets(self.add_fieldsets), + 'fields': admin.options.flatten_fieldsets(self.add_fieldsets), }) defaults.update(kwargs) return super(MailboxAdmin, self).get_form(request, obj, **defaults) diff --git a/gnuviechadmin/managemails/migrations/0001_initial.py b/gnuviechadmin/managemails/migrations/0001_initial.py index f170f2c..293f59d 100644 --- a/gnuviechadmin/managemails/migrations/0001_initial.py +++ b/gnuviechadmin/managemails/migrations/0001_initial.py @@ -1,130 +1,102 @@ # -*- coding: utf-8 -*- -from south.utils import datetime_utils as datetime -from south.db import db -from south.v2 import SchemaMigration -from django.db import models +from __future__ import unicode_literals + +from django.db import models, migrations +import django.utils.timezone +import model_utils.fields -class Migration(SchemaMigration): +class Migration(migrations.Migration): - def forwards(self, orm): - # Adding model 'MailDomain' - db.create_table(u'managemails_maildomain', ( - (u'id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), - ('domain', self.gf('django.db.models.fields.CharField')(unique=True, max_length=128)), - )) - db.send_create_signal(u'managemails', ['MailDomain']) + dependencies = [ + ('domains', '0001_initial'), + ('osusers', '0001_initial'), + ] - # Adding model 'Mailbox' - db.create_table(u'managemails_mailbox', ( - (u'id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), - ('username', self.gf('django.db.models.fields.CharField')(unique=True, max_length=128)), - ('domain', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['managemails.MailDomain'])), - ('password', self.gf('django.db.models.fields.CharField')(max_length=64)), - ('home', self.gf('django.db.models.fields.CharField')(max_length=255)), - ('uid', self.gf('django.db.models.fields.PositiveSmallIntegerField')()), - ('gid', self.gf('django.db.models.fields.PositiveSmallIntegerField')()), - ('active', self.gf('django.db.models.fields.BooleanField')(default=True)), - )) - db.send_create_signal(u'managemails', ['Mailbox']) - - # Adding model 'MailAddress' - db.create_table(u'managemails_mailaddress', ( - (u'id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), - ('localpart', self.gf('django.db.models.fields.CharField')(max_length=128)), - ('domain', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['managemails.MailDomain'])), - ('active', self.gf('django.db.models.fields.BooleanField')(default=True)), - )) - db.send_create_signal(u'managemails', ['MailAddress']) - - # Adding unique constraint on 'MailAddress', fields ['localpart', 'domain'] - db.create_unique(u'managemails_mailaddress', ['localpart', 'domain_id']) - - # Adding model 'MailAddressMailbox' - db.create_table(u'managemails_mailaddressmailbox', ( - (u'id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), - ('mailaddress', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['managemails.MailAddress'])), - ('mailbox', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['managemails.Mailbox'])), - )) - db.send_create_signal(u'managemails', ['MailAddressMailbox']) - - # Adding unique constraint on 'MailAddressMailbox', fields ['mailaddress', 'mailbox'] - db.create_unique(u'managemails_mailaddressmailbox', ['mailaddress_id', 'mailbox_id']) - - # Adding model 'MailAddressForward' - db.create_table(u'managemails_mailaddressforward', ( - (u'id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), - ('mailaddress', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['managemails.MailAddress'])), - ('target', self.gf('django.db.models.fields.EmailField')(max_length=254)), - )) - db.send_create_signal(u'managemails', ['MailAddressForward']) - - # Adding unique constraint on 'MailAddressForward', fields ['mailaddress', 'target'] - db.create_unique(u'managemails_mailaddressforward', ['mailaddress_id', 'target']) - - - def backwards(self, orm): - # Removing unique constraint on 'MailAddressForward', fields ['mailaddress', 'target'] - db.delete_unique(u'managemails_mailaddressforward', ['mailaddress_id', 'target']) - - # Removing unique constraint on 'MailAddressMailbox', fields ['mailaddress', 'mailbox'] - db.delete_unique(u'managemails_mailaddressmailbox', ['mailaddress_id', 'mailbox_id']) - - # Removing unique constraint on 'MailAddress', fields ['localpart', 'domain'] - db.delete_unique(u'managemails_mailaddress', ['localpart', 'domain_id']) - - # Deleting model 'MailDomain' - db.delete_table(u'managemails_maildomain') - - # Deleting model 'Mailbox' - db.delete_table(u'managemails_mailbox') - - # Deleting model 'MailAddress' - db.delete_table(u'managemails_mailaddress') - - # Deleting model 'MailAddressMailbox' - db.delete_table(u'managemails_mailaddressmailbox') - - # Deleting model 'MailAddressForward' - db.delete_table(u'managemails_mailaddressforward') - - - models = { - u'managemails.mailaddress': { - 'Meta': {'unique_together': "(('localpart', 'domain'),)", 'object_name': 'MailAddress'}, - 'active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'domain': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['managemails.MailDomain']"}), - u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'localpart': ('django.db.models.fields.CharField', [], {'max_length': '128'}) - }, - u'managemails.mailaddressforward': { - 'Meta': {'unique_together': "(('mailaddress', 'target'),)", 'object_name': 'MailAddressForward'}, - u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'mailaddress': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['managemails.MailAddress']"}), - 'target': ('django.db.models.fields.EmailField', [], {'max_length': '254'}) - }, - u'managemails.mailaddressmailbox': { - 'Meta': {'unique_together': "(('mailaddress', 'mailbox'),)", 'object_name': 'MailAddressMailbox'}, - u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'mailaddress': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['managemails.MailAddress']"}), - 'mailbox': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['managemails.Mailbox']"}) - }, - u'managemails.mailbox': { - 'Meta': {'object_name': 'Mailbox'}, - 'active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'domain': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['managemails.MailDomain']"}), - 'gid': ('django.db.models.fields.PositiveSmallIntegerField', [], {}), - 'home': ('django.db.models.fields.CharField', [], {'max_length': '255'}), - u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'password': ('django.db.models.fields.CharField', [], {'max_length': '64'}), - 'uid': ('django.db.models.fields.PositiveSmallIntegerField', [], {}), - 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '128'}) - }, - u'managemails.maildomain': { - 'Meta': {'object_name': 'MailDomain'}, - 'domain': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '128'}), - u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}) - } - } - - complete_apps = ['managemails'] \ No newline at end of file + operations = [ + migrations.CreateModel( + name='MailAddress', + fields=[ + ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), + ('created', model_utils.fields.AutoCreatedField(default=django.utils.timezone.now, verbose_name='created', editable=False)), + ('modified', model_utils.fields.AutoLastModifiedField(default=django.utils.timezone.now, verbose_name='modified', editable=False)), + ('active', models.BooleanField(default=True)), + ('localpart', models.CharField(max_length=128)), + ], + options={ + 'verbose_name': 'Mail address', + 'verbose_name_plural': 'Mail addresses', + }, + bases=(models.Model,), + ), + migrations.CreateModel( + name='MailAddressForward', + fields=[ + ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), + ('created', model_utils.fields.AutoCreatedField(default=django.utils.timezone.now, verbose_name='created', editable=False)), + ('modified', model_utils.fields.AutoLastModifiedField(default=django.utils.timezone.now, verbose_name='modified', editable=False)), + ('target', models.EmailField(max_length=254)), + ], + options={ + }, + bases=(models.Model,), + ), + migrations.CreateModel( + name='MailAddressMailbox', + fields=[ + ('created', model_utils.fields.AutoCreatedField(default=django.utils.timezone.now, verbose_name='created', editable=False)), + ('modified', model_utils.fields.AutoLastModifiedField(default=django.utils.timezone.now, verbose_name='modified', editable=False)), + ('mailaddress', models.OneToOneField(primary_key=True, serialize=False, to='managemails.MailAddress')), + ], + options={ + }, + bases=(models.Model,), + ), + migrations.CreateModel( + name='Mailbox', + fields=[ + ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), + ('created', model_utils.fields.AutoCreatedField(default=django.utils.timezone.now, verbose_name='created', editable=False)), + ('modified', model_utils.fields.AutoLastModifiedField(default=django.utils.timezone.now, verbose_name='modified', editable=False)), + ('active', models.BooleanField(default=True)), + ('username', models.CharField(unique=True, max_length=128)), + ('password', models.CharField(max_length=255)), + ('osuser', models.ForeignKey(to='osusers.User')), + ], + options={ + 'verbose_name': 'Mailbox', + 'verbose_name_plural': 'Mailboxes', + }, + bases=(models.Model,), + ), + migrations.AddField( + model_name='mailaddressmailbox', + name='mailbox', + field=models.ForeignKey(to='managemails.Mailbox'), + preserve_default=True, + ), + migrations.AlterUniqueTogether( + name='mailaddressmailbox', + unique_together=set([('mailaddress', 'mailbox')]), + ), + migrations.AddField( + model_name='mailaddressforward', + name='mailaddress', + field=models.ForeignKey(to='managemails.MailAddress'), + preserve_default=True, + ), + migrations.AlterUniqueTogether( + name='mailaddressforward', + unique_together=set([('mailaddress', 'target')]), + ), + migrations.AddField( + model_name='mailaddress', + name='domain', + field=models.ForeignKey(to='domains.MailDomain'), + preserve_default=True, + ), + migrations.AlterUniqueTogether( + name='mailaddress', + unique_together=set([('localpart', 'domain')]), + ), + ] diff --git a/gnuviechadmin/managemails/migrations/0002_auto__chg_field_mailbox_password.py b/gnuviechadmin/managemails/migrations/0002_auto__chg_field_mailbox_password.py deleted file mode 100644 index deaf3cd..0000000 --- a/gnuviechadmin/managemails/migrations/0002_auto__chg_field_mailbox_password.py +++ /dev/null @@ -1,58 +0,0 @@ -# -*- coding: utf-8 -*- -from south.utils import datetime_utils as datetime -from south.db import db -from south.v2 import SchemaMigration -from django.db import models - - -class Migration(SchemaMigration): - - def forwards(self, orm): - - # Changing field 'Mailbox.password' - db.alter_column(u'managemails_mailbox', 'password', self.gf('django.db.models.fields.CharField')(max_length=255)) - - def backwards(self, orm): - - # Changing field 'Mailbox.password' - db.alter_column(u'managemails_mailbox', 'password', self.gf('django.db.models.fields.CharField')(max_length=64)) - - models = { - u'managemails.mailaddress': { - 'Meta': {'unique_together': "(('localpart', 'domain'),)", 'object_name': 'MailAddress'}, - 'active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'domain': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['managemails.MailDomain']"}), - u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'localpart': ('django.db.models.fields.CharField', [], {'max_length': '128'}) - }, - u'managemails.mailaddressforward': { - 'Meta': {'unique_together': "(('mailaddress', 'target'),)", 'object_name': 'MailAddressForward'}, - u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'mailaddress': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['managemails.MailAddress']"}), - 'target': ('django.db.models.fields.EmailField', [], {'max_length': '254'}) - }, - u'managemails.mailaddressmailbox': { - 'Meta': {'unique_together': "(('mailaddress', 'mailbox'),)", 'object_name': 'MailAddressMailbox'}, - u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'mailaddress': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['managemails.MailAddress']"}), - 'mailbox': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['managemails.Mailbox']"}) - }, - u'managemails.mailbox': { - 'Meta': {'object_name': 'Mailbox'}, - 'active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'domain': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['managemails.MailDomain']"}), - 'gid': ('django.db.models.fields.PositiveSmallIntegerField', [], {}), - 'home': ('django.db.models.fields.CharField', [], {'max_length': '255'}), - u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'password': ('django.db.models.fields.CharField', [], {'max_length': '255'}), - 'uid': ('django.db.models.fields.PositiveSmallIntegerField', [], {}), - 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '128'}) - }, - u'managemails.maildomain': { - 'Meta': {'object_name': 'MailDomain'}, - 'domain': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '128'}), - u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}) - } - } - - complete_apps = ['managemails'] \ No newline at end of file diff --git a/gnuviechadmin/managemails/migrations/0003_auto__del_field_mailbox_domain.py b/gnuviechadmin/managemails/migrations/0003_auto__del_field_mailbox_domain.py deleted file mode 100644 index 975a034..0000000 --- a/gnuviechadmin/managemails/migrations/0003_auto__del_field_mailbox_domain.py +++ /dev/null @@ -1,54 +0,0 @@ -# -*- coding: utf-8 -*- -# pymode:lint_ignore=E501 -from south.db import db -from south.v2 import SchemaMigration - - -class Migration(SchemaMigration): - - def forwards(self, orm): - # Deleting field 'Mailbox.domain' - db.delete_column(u'managemails_mailbox', 'domain_id') - - def backwards(self, orm): - # User chose to not deal with backwards NULL issues for 'Mailbox.domain' - raise RuntimeError("Cannot reverse this migration. 'Mailbox.domain' and its values cannot be restored.") - - models = { - u'managemails.mailaddress': { - 'Meta': {'unique_together': "(('localpart', 'domain'),)", 'object_name': 'MailAddress'}, - 'active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'domain': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['managemails.MailDomain']"}), - u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'localpart': ('django.db.models.fields.CharField', [], {'max_length': '128'}) - }, - u'managemails.mailaddressforward': { - 'Meta': {'unique_together': "(('mailaddress', 'target'),)", 'object_name': 'MailAddressForward'}, - u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'mailaddress': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['managemails.MailAddress']"}), - 'target': ('django.db.models.fields.EmailField', [], {'max_length': '254'}) - }, - u'managemails.mailaddressmailbox': { - 'Meta': {'unique_together': "(('mailaddress', 'mailbox'),)", 'object_name': 'MailAddressMailbox'}, - u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'mailaddress': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['managemails.MailAddress']"}), - 'mailbox': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['managemails.Mailbox']"}) - }, - u'managemails.mailbox': { - 'Meta': {'object_name': 'Mailbox'}, - 'active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'gid': ('django.db.models.fields.PositiveSmallIntegerField', [], {}), - 'home': ('django.db.models.fields.CharField', [], {'max_length': '255'}), - u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'password': ('django.db.models.fields.CharField', [], {'max_length': '255'}), - 'uid': ('django.db.models.fields.PositiveSmallIntegerField', [], {}), - 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '128'}) - }, - u'managemails.maildomain': { - 'Meta': {'object_name': 'MailDomain'}, - 'domain': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '128'}), - u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}) - } - } - - complete_apps = ['managemails'] diff --git a/gnuviechadmin/managemails/migrations/0004_auto__del_field_mailaddressmailbox_id__chg_field_mailaddressmailbox_ma.py b/gnuviechadmin/managemails/migrations/0004_auto__del_field_mailaddressmailbox_id__chg_field_mailaddressmailbox_ma.py deleted file mode 100644 index 0fd60a0..0000000 --- a/gnuviechadmin/managemails/migrations/0004_auto__del_field_mailaddressmailbox_id__chg_field_mailaddressmailbox_ma.py +++ /dev/null @@ -1,58 +0,0 @@ -# -*- coding: utf-8 -*- -# pymode:lint_ignore=E501 -from south.db import db -from south.v2 import SchemaMigration - - -class Migration(SchemaMigration): - - def forwards(self, orm): - # Deleting field 'MailAddressMailbox.id' - db.delete_column(u'managemails_mailaddressmailbox', u'id') - - # Changing field 'MailAddressMailbox.mailaddress' - db.alter_column(u'managemails_mailaddressmailbox', 'mailaddress_id', self.gf('django.db.models.fields.related.OneToOneField')(to=orm['managemails.MailAddress'], unique=True, primary_key=True)) - # Adding unique constraint on 'MailAddressMailbox', fields ['mailaddress'] - db.create_unique(u'managemails_mailaddressmailbox', ['mailaddress_id']) - - def backwards(self, orm): - # User chose to not deal with backwards NULL issues for 'MailAddressMailbox.id' - raise RuntimeError("Cannot reverse this migration. 'MailAddressMailbox.id' and its values cannot be restored.") - - models = { - u'managemails.mailaddress': { - 'Meta': {'unique_together': "(('localpart', 'domain'),)", 'object_name': 'MailAddress'}, - 'active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'domain': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['managemails.MailDomain']"}), - u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'localpart': ('django.db.models.fields.CharField', [], {'max_length': '128'}) - }, - u'managemails.mailaddressforward': { - 'Meta': {'unique_together': "(('mailaddress', 'target'),)", 'object_name': 'MailAddressForward'}, - u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'mailaddress': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['managemails.MailAddress']"}), - 'target': ('django.db.models.fields.EmailField', [], {'max_length': '254'}) - }, - u'managemails.mailaddressmailbox': { - 'Meta': {'unique_together': "(('mailaddress', 'mailbox'),)", 'object_name': 'MailAddressMailbox'}, - 'mailaddress': ('django.db.models.fields.related.OneToOneField', [], {'to': u"orm['managemails.MailAddress']", 'unique': 'True', 'primary_key': 'True'}), - 'mailbox': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['managemails.Mailbox']"}) - }, - u'managemails.mailbox': { - 'Meta': {'object_name': 'Mailbox'}, - 'active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'gid': ('django.db.models.fields.PositiveSmallIntegerField', [], {}), - 'home': ('django.db.models.fields.CharField', [], {'max_length': '255'}), - u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'password': ('django.db.models.fields.CharField', [], {'max_length': '255'}), - 'uid': ('django.db.models.fields.PositiveSmallIntegerField', [], {}), - 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '128'}) - }, - u'managemails.maildomain': { - 'Meta': {'object_name': 'MailDomain'}, - 'domain': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '128'}), - u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}) - } - } - - complete_apps = ['managemails'] diff --git a/gnuviechadmin/managemails/migrations/0005_auto__add_field_mailaddressmailbox_created__add_field_mailaddressmailb.py b/gnuviechadmin/managemails/migrations/0005_auto__add_field_mailaddressmailbox_created__add_field_mailaddressmailb.py deleted file mode 100644 index 002c858..0000000 --- a/gnuviechadmin/managemails/migrations/0005_auto__add_field_mailaddressmailbox_created__add_field_mailaddressmailb.py +++ /dev/null @@ -1,140 +0,0 @@ -# -*- coding: utf-8 -*- -from south.utils import datetime_utils as datetime -from south.db import db -from south.v2 import SchemaMigration -from django.db import models - - -class Migration(SchemaMigration): - - def forwards(self, orm): - # Adding field 'MailAddressMailbox.created' - db.add_column(u'managemails_mailaddressmailbox', 'created', - self.gf('model_utils.fields.AutoCreatedField')(default=datetime.datetime.now), - keep_default=False) - - # Adding field 'MailAddressMailbox.modified' - db.add_column(u'managemails_mailaddressmailbox', 'modified', - self.gf('model_utils.fields.AutoLastModifiedField')(default=datetime.datetime.now), - keep_default=False) - - # Adding field 'MailDomain.created' - db.add_column(u'managemails_maildomain', 'created', - self.gf('model_utils.fields.AutoCreatedField')(default=datetime.datetime.now), - keep_default=False) - - # Adding field 'MailDomain.modified' - db.add_column(u'managemails_maildomain', 'modified', - self.gf('model_utils.fields.AutoLastModifiedField')(default=datetime.datetime.now), - keep_default=False) - - # Adding field 'Mailbox.created' - db.add_column(u'managemails_mailbox', 'created', - self.gf('model_utils.fields.AutoCreatedField')(default=datetime.datetime.now), - keep_default=False) - - # Adding field 'Mailbox.modified' - db.add_column(u'managemails_mailbox', 'modified', - self.gf('model_utils.fields.AutoLastModifiedField')(default=datetime.datetime.now), - keep_default=False) - - # Adding field 'MailAddress.created' - db.add_column(u'managemails_mailaddress', 'created', - self.gf('model_utils.fields.AutoCreatedField')(default=datetime.datetime.now), - keep_default=False) - - # Adding field 'MailAddress.modified' - db.add_column(u'managemails_mailaddress', 'modified', - self.gf('model_utils.fields.AutoLastModifiedField')(default=datetime.datetime.now), - keep_default=False) - - # Adding field 'MailAddressForward.created' - db.add_column(u'managemails_mailaddressforward', 'created', - self.gf('model_utils.fields.AutoCreatedField')(default=datetime.datetime.now), - keep_default=False) - - # Adding field 'MailAddressForward.modified' - db.add_column(u'managemails_mailaddressforward', 'modified', - self.gf('model_utils.fields.AutoLastModifiedField')(default=datetime.datetime.now), - keep_default=False) - - - def backwards(self, orm): - # Deleting field 'MailAddressMailbox.created' - db.delete_column(u'managemails_mailaddressmailbox', 'created') - - # Deleting field 'MailAddressMailbox.modified' - db.delete_column(u'managemails_mailaddressmailbox', 'modified') - - # Deleting field 'MailDomain.created' - db.delete_column(u'managemails_maildomain', 'created') - - # Deleting field 'MailDomain.modified' - db.delete_column(u'managemails_maildomain', 'modified') - - # Deleting field 'Mailbox.created' - db.delete_column(u'managemails_mailbox', 'created') - - # Deleting field 'Mailbox.modified' - db.delete_column(u'managemails_mailbox', 'modified') - - # Deleting field 'MailAddress.created' - db.delete_column(u'managemails_mailaddress', 'created') - - # Deleting field 'MailAddress.modified' - db.delete_column(u'managemails_mailaddress', 'modified') - - # Deleting field 'MailAddressForward.created' - db.delete_column(u'managemails_mailaddressforward', 'created') - - # Deleting field 'MailAddressForward.modified' - db.delete_column(u'managemails_mailaddressforward', 'modified') - - - models = { - u'managemails.mailaddress': { - 'Meta': {'unique_together': "(('localpart', 'domain'),)", 'object_name': 'MailAddress'}, - 'active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'created': ('model_utils.fields.AutoCreatedField', [], {'default': 'datetime.datetime.now'}), - 'domain': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['managemails.MailDomain']"}), - u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'localpart': ('django.db.models.fields.CharField', [], {'max_length': '128'}), - 'modified': ('model_utils.fields.AutoLastModifiedField', [], {'default': 'datetime.datetime.now'}) - }, - u'managemails.mailaddressforward': { - 'Meta': {'unique_together': "(('mailaddress', 'target'),)", 'object_name': 'MailAddressForward'}, - 'created': ('model_utils.fields.AutoCreatedField', [], {'default': 'datetime.datetime.now'}), - u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'mailaddress': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['managemails.MailAddress']"}), - 'modified': ('model_utils.fields.AutoLastModifiedField', [], {'default': 'datetime.datetime.now'}), - 'target': ('django.db.models.fields.EmailField', [], {'max_length': '254'}) - }, - u'managemails.mailaddressmailbox': { - 'Meta': {'unique_together': "(('mailaddress', 'mailbox'),)", 'object_name': 'MailAddressMailbox'}, - 'created': ('model_utils.fields.AutoCreatedField', [], {'default': 'datetime.datetime.now'}), - 'mailaddress': ('django.db.models.fields.related.OneToOneField', [], {'to': u"orm['managemails.MailAddress']", 'unique': 'True', 'primary_key': 'True'}), - 'mailbox': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['managemails.Mailbox']"}), - 'modified': ('model_utils.fields.AutoLastModifiedField', [], {'default': 'datetime.datetime.now'}) - }, - u'managemails.mailbox': { - 'Meta': {'object_name': 'Mailbox'}, - 'active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'created': ('model_utils.fields.AutoCreatedField', [], {'default': 'datetime.datetime.now'}), - 'gid': ('django.db.models.fields.PositiveSmallIntegerField', [], {}), - 'home': ('django.db.models.fields.CharField', [], {'max_length': '255'}), - u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'modified': ('model_utils.fields.AutoLastModifiedField', [], {'default': 'datetime.datetime.now'}), - 'password': ('django.db.models.fields.CharField', [], {'max_length': '255'}), - 'uid': ('django.db.models.fields.PositiveSmallIntegerField', [], {}), - 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '128'}) - }, - u'managemails.maildomain': { - 'Meta': {'object_name': 'MailDomain'}, - 'created': ('model_utils.fields.AutoCreatedField', [], {'default': 'datetime.datetime.now'}), - 'domain': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '128'}), - u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'modified': ('model_utils.fields.AutoLastModifiedField', [], {'default': 'datetime.datetime.now'}) - } - } - - complete_apps = ['managemails'] \ No newline at end of file diff --git a/gnuviechadmin/managemails/migrations/0006_add_osusers_for_mailboxes.py b/gnuviechadmin/managemails/migrations/0006_add_osusers_for_mailboxes.py deleted file mode 100644 index 8762db8..0000000 --- a/gnuviechadmin/managemails/migrations/0006_add_osusers_for_mailboxes.py +++ /dev/null @@ -1,134 +0,0 @@ -# -*- coding: utf-8 -*- -# pymode:lint_ignore=E501 -from south.v2 import DataMigration - - -class Migration(DataMigration): - - def forwards(self, orm): - "Adds user, group and shadow entries." - - Mailbox = orm['managemails.Mailbox'] - User = orm['osusers.User'] - Group = orm['osusers.Group'] - Shadow = orm['osusers.Shadow'] - - for mailbox in Mailbox.objects.all(): - try: - group = Group.objects.get(gid=mailbox.gid) - except Group.DoesNotExist: - group = Group.objects.create( - groupname=mailbox.username, gid=mailbox.gid) - try: - user = User.objects.get(uid=mailbox.uid) - except User.DoesNotExist: - user = User.objects.create( - username=mailbox.username, uid=mailbox.uid, - homedir=mailbox.home, group=group - ) - shadow = Shadow.objects.create( - user=user, passwd=mailbox.password) - shadow.save() - - def backwards(self, orm): - "Delete user, group and shadow entries." - - Mailbox = orm['managemails.Mailbox'] - User = orm['osusers.User'] - Group = orm['osusers.Group'] - - for mailbox in Mailbox.objects.all(): - group = Group.objects.get(gid=mailbox.gid) - user = User.objects.get(uid=mailbox.uid) - user.delete() - group.delete() - - models = { - u'managemails.mailaddress': { - 'Meta': {'unique_together': "(('localpart', 'domain'),)", 'object_name': 'MailAddress'}, - 'active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'created': ('model_utils.fields.AutoCreatedField', [], {'default': 'datetime.datetime.now'}), - 'domain': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['managemails.MailDomain']"}), - u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'localpart': ('django.db.models.fields.CharField', [], {'max_length': '128'}), - 'modified': ('model_utils.fields.AutoLastModifiedField', [], {'default': 'datetime.datetime.now'}) - }, - u'managemails.mailaddressforward': { - 'Meta': {'unique_together': "(('mailaddress', 'target'),)", 'object_name': 'MailAddressForward'}, - 'created': ('model_utils.fields.AutoCreatedField', [], {'default': 'datetime.datetime.now'}), - u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'mailaddress': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['managemails.MailAddress']"}), - 'modified': ('model_utils.fields.AutoLastModifiedField', [], {'default': 'datetime.datetime.now'}), - 'target': ('django.db.models.fields.EmailField', [], {'max_length': '254'}) - }, - u'managemails.mailaddressmailbox': { - 'Meta': {'unique_together': "(('mailaddress', 'mailbox'),)", 'object_name': 'MailAddressMailbox'}, - 'created': ('model_utils.fields.AutoCreatedField', [], {'default': 'datetime.datetime.now'}), - 'mailaddress': ('django.db.models.fields.related.OneToOneField', [], {'to': u"orm['managemails.MailAddress']", 'unique': 'True', 'primary_key': 'True'}), - 'mailbox': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['managemails.Mailbox']"}), - 'modified': ('model_utils.fields.AutoLastModifiedField', [], {'default': 'datetime.datetime.now'}) - }, - u'managemails.mailbox': { - 'Meta': {'object_name': 'Mailbox'}, - 'active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'created': ('model_utils.fields.AutoCreatedField', [], {'default': 'datetime.datetime.now'}), - 'gid': ('django.db.models.fields.PositiveSmallIntegerField', [], {}), - 'home': ('django.db.models.fields.CharField', [], {'max_length': '255'}), - u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'modified': ('model_utils.fields.AutoLastModifiedField', [], {'default': 'datetime.datetime.now'}), - 'password': ('django.db.models.fields.CharField', [], {'max_length': '255'}), - 'uid': ('django.db.models.fields.PositiveSmallIntegerField', [], {}), - 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '128'}) - }, - u'managemails.maildomain': { - 'Meta': {'object_name': 'MailDomain'}, - 'created': ('model_utils.fields.AutoCreatedField', [], {'default': 'datetime.datetime.now'}), - 'domain': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '128'}), - u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'modified': ('model_utils.fields.AutoLastModifiedField', [], {'default': 'datetime.datetime.now'}) - }, - u'osusers.additionalgroup': { - 'Meta': {'unique_together': "(('user', 'group'),)", 'object_name': 'AdditionalGroup'}, - 'created': ('model_utils.fields.AutoCreatedField', [], {'default': 'datetime.datetime.now'}), - 'group': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['osusers.Group']"}), - u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'modified': ('model_utils.fields.AutoLastModifiedField', [], {'default': 'datetime.datetime.now'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['osusers.User']"}) - }, - u'osusers.group': { - 'Meta': {'object_name': 'Group'}, - 'created': ('model_utils.fields.AutoCreatedField', [], {'default': 'datetime.datetime.now'}), - 'descr': ('django.db.models.fields.TextField', [], {'blank': 'True'}), - 'gid': ('django.db.models.fields.PositiveSmallIntegerField', [], {'unique': 'True', 'primary_key': 'True'}), - 'groupname': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '16'}), - 'modified': ('model_utils.fields.AutoLastModifiedField', [], {'default': 'datetime.datetime.now'}), - 'passwd': ('django.db.models.fields.CharField', [], {'max_length': '128', 'blank': 'True'}) - }, - u'osusers.shadow': { - 'Meta': {'object_name': 'Shadow'}, - 'changedays': ('django.db.models.fields.PositiveSmallIntegerField', [], {'null': 'True', 'blank': 'True'}), - 'created': ('model_utils.fields.AutoCreatedField', [], {'default': 'datetime.datetime.now'}), - 'expiredays': ('django.db.models.fields.PositiveSmallIntegerField', [], {'default': 'None', 'null': 'True', 'blank': 'True'}), - 'gracedays': ('django.db.models.fields.PositiveSmallIntegerField', [], {'null': 'True', 'blank': 'True'}), - 'inactdays': ('django.db.models.fields.PositiveSmallIntegerField', [], {'null': 'True', 'blank': 'True'}), - 'maxage': ('django.db.models.fields.PositiveSmallIntegerField', [], {'null': 'True', 'blank': 'True'}), - 'minage': ('django.db.models.fields.PositiveSmallIntegerField', [], {'null': 'True', 'blank': 'True'}), - 'modified': ('model_utils.fields.AutoLastModifiedField', [], {'default': 'datetime.datetime.now'}), - 'passwd': ('django.db.models.fields.CharField', [], {'max_length': '128'}), - 'user': ('django.db.models.fields.related.OneToOneField', [], {'to': u"orm['osusers.User']", 'unique': 'True', 'primary_key': 'True'}) - }, - u'osusers.user': { - 'Meta': {'object_name': 'User'}, - 'created': ('model_utils.fields.AutoCreatedField', [], {'default': 'datetime.datetime.now'}), - 'gecos': ('django.db.models.fields.CharField', [], {'max_length': '128', 'blank': 'True'}), - 'group': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['osusers.Group']"}), - 'homedir': ('django.db.models.fields.CharField', [], {'max_length': '256'}), - 'modified': ('model_utils.fields.AutoLastModifiedField', [], {'default': 'datetime.datetime.now'}), - 'shell': ('django.db.models.fields.CharField', [], {'max_length': '64'}), - 'uid': ('django.db.models.fields.PositiveSmallIntegerField', [], {'unique': 'True', 'primary_key': 'True'}), - 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '64'}) - } - } - - complete_apps = ['osusers', 'managemails'] - symmetrical = True diff --git a/gnuviechadmin/managemails/migrations/0007_use_osusers_for_mailboxes.py b/gnuviechadmin/managemails/migrations/0007_use_osusers_for_mailboxes.py deleted file mode 100644 index e1eeae5..0000000 --- a/gnuviechadmin/managemails/migrations/0007_use_osusers_for_mailboxes.py +++ /dev/null @@ -1,128 +0,0 @@ -# -*- coding: utf-8 -*- -# pymode:lint_ignore=E501 -from south.db import db -from south.v2 import SchemaMigration - - -class Migration(SchemaMigration): - - def forwards(self, orm): - Mailbox = orm['managemails.Mailbox'] - User = orm['osusers.User'] - - db.start_transaction() - - db.add_column( - u'managemails_mailbox', 'osuser_id', - self.gf('django.db.models.fields.PositiveSmallIntegerField')(default=0)) - - for mailbox in Mailbox.objects.all(): - user = User.objects.get(uid=mailbox.uid) - mailbox.osuser = user - mailbox.save() - - db.alter_column( - u'managemails_mailbox', 'osuser_id', - self.gf('django.db.models.fields.related.ForeignKey')(to=orm['osusers.User'])) - - # Deleting field 'Mailbox.home' - db.delete_column(u'managemails_mailbox', 'home') - - # Deleting field 'Mailbox.gid' - db.delete_column(u'managemails_mailbox', 'gid') - - # Deleting field 'Mailbox.uid' - db.delete_column(u'managemails_mailbox', 'uid') - - db.commit_transaction() - - def backwards(self, orm): - raise RuntimeError("Cannot reverse this migration.") - - models = { - u'managemails.mailaddress': { - 'Meta': {'unique_together': "(('localpart', 'domain'),)", 'object_name': 'MailAddress'}, - 'active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'created': ('model_utils.fields.AutoCreatedField', [], {'default': 'datetime.datetime.now'}), - 'domain': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['managemails.MailDomain']"}), - u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'localpart': ('django.db.models.fields.CharField', [], {'max_length': '128'}), - 'modified': ('model_utils.fields.AutoLastModifiedField', [], {'default': 'datetime.datetime.now'}) - }, - u'managemails.mailaddressforward': { - 'Meta': {'unique_together': "(('mailaddress', 'target'),)", 'object_name': 'MailAddressForward'}, - 'created': ('model_utils.fields.AutoCreatedField', [], {'default': 'datetime.datetime.now'}), - u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'mailaddress': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['managemails.MailAddress']"}), - 'modified': ('model_utils.fields.AutoLastModifiedField', [], {'default': 'datetime.datetime.now'}), - 'target': ('django.db.models.fields.EmailField', [], {'max_length': '254'}) - }, - u'managemails.mailaddressmailbox': { - 'Meta': {'unique_together': "(('mailaddress', 'mailbox'),)", 'object_name': 'MailAddressMailbox'}, - 'created': ('model_utils.fields.AutoCreatedField', [], {'default': 'datetime.datetime.now'}), - 'mailaddress': ('django.db.models.fields.related.OneToOneField', [], {'to': u"orm['managemails.MailAddress']", 'unique': 'True', 'primary_key': 'True'}), - 'mailbox': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['managemails.Mailbox']"}), - 'modified': ('model_utils.fields.AutoLastModifiedField', [], {'default': 'datetime.datetime.now'}) - }, - u'managemails.mailbox': { - 'Meta': {'object_name': 'Mailbox'}, - 'active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'created': ('model_utils.fields.AutoCreatedField', [], {'default': 'datetime.datetime.now'}), - u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'modified': ('model_utils.fields.AutoLastModifiedField', [], {'default': 'datetime.datetime.now'}), - 'osuser': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['osusers.User']"}), - 'password': ('django.db.models.fields.CharField', [], {'max_length': '255'}), - 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '128'}), - 'uid': ('django.db.models.fields.PositiveSmallIntegerField', [], {}), - }, - u'managemails.maildomain': { - 'Meta': {'object_name': 'MailDomain'}, - 'created': ('model_utils.fields.AutoCreatedField', [], {'default': 'datetime.datetime.now'}), - 'domain': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '128'}), - u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'modified': ('model_utils.fields.AutoLastModifiedField', [], {'default': 'datetime.datetime.now'}) - }, - u'osusers.additionalgroup': { - 'Meta': {'unique_together': "(('user', 'group'),)", 'object_name': 'AdditionalGroup'}, - 'created': ('model_utils.fields.AutoCreatedField', [], {'default': 'datetime.datetime.now'}), - 'group': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['osusers.Group']"}), - u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'modified': ('model_utils.fields.AutoLastModifiedField', [], {'default': 'datetime.datetime.now'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['osusers.User']"}) - }, - u'osusers.group': { - 'Meta': {'object_name': 'Group'}, - 'created': ('model_utils.fields.AutoCreatedField', [], {'default': 'datetime.datetime.now'}), - 'descr': ('django.db.models.fields.TextField', [], {'blank': 'True'}), - 'gid': ('django.db.models.fields.PositiveSmallIntegerField', [], {'unique': 'True', 'primary_key': 'True'}), - 'groupname': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '16'}), - 'modified': ('model_utils.fields.AutoLastModifiedField', [], {'default': 'datetime.datetime.now'}), - 'passwd': ('django.db.models.fields.CharField', [], {'max_length': '128', 'blank': 'True'}) - }, - u'osusers.shadow': { - 'Meta': {'object_name': 'Shadow'}, - 'changedays': ('django.db.models.fields.PositiveSmallIntegerField', [], {'null': 'True', 'blank': 'True'}), - 'created': ('model_utils.fields.AutoCreatedField', [], {'default': 'datetime.datetime.now'}), - 'expiredays': ('django.db.models.fields.PositiveSmallIntegerField', [], {'default': 'None', 'null': 'True', 'blank': 'True'}), - 'gracedays': ('django.db.models.fields.PositiveSmallIntegerField', [], {'null': 'True', 'blank': 'True'}), - 'inactdays': ('django.db.models.fields.PositiveSmallIntegerField', [], {'null': 'True', 'blank': 'True'}), - 'maxage': ('django.db.models.fields.PositiveSmallIntegerField', [], {'null': 'True', 'blank': 'True'}), - 'minage': ('django.db.models.fields.PositiveSmallIntegerField', [], {'null': 'True', 'blank': 'True'}), - 'modified': ('model_utils.fields.AutoLastModifiedField', [], {'default': 'datetime.datetime.now'}), - 'passwd': ('django.db.models.fields.CharField', [], {'max_length': '128'}), - 'user': ('django.db.models.fields.related.OneToOneField', [], {'to': u"orm['osusers.User']", 'unique': 'True', 'primary_key': 'True'}) - }, - u'osusers.user': { - 'Meta': {'object_name': 'User'}, - 'created': ('model_utils.fields.AutoCreatedField', [], {'default': 'datetime.datetime.now'}), - 'gecos': ('django.db.models.fields.CharField', [], {'max_length': '128', 'blank': 'True'}), - 'group': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['osusers.Group']"}), - 'homedir': ('django.db.models.fields.CharField', [], {'max_length': '256'}), - 'modified': ('model_utils.fields.AutoLastModifiedField', [], {'default': 'datetime.datetime.now'}), - 'shell': ('django.db.models.fields.CharField', [], {'max_length': '64'}), - 'uid': ('django.db.models.fields.PositiveSmallIntegerField', [], {'unique': 'True', 'primary_key': 'True'}), - 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '64'}) - } - } - - complete_apps = ['osusers', 'managemails'] diff --git a/gnuviechadmin/managemails/migrations/0008_copy_existing_maildomains.py b/gnuviechadmin/managemails/migrations/0008_copy_existing_maildomains.py deleted file mode 100644 index 35b558f..0000000 --- a/gnuviechadmin/managemails/migrations/0008_copy_existing_maildomains.py +++ /dev/null @@ -1,94 +0,0 @@ -# -*- coding: utf-8 -*- -# pymode:lint_ignore=E501 -from south.v2 import DataMigration - - -class Migration(DataMigration): - - def forwards(self, orm): - "Write your forwards methods here." - OrigMailDomain = orm['managemails.MailDomain'] - NewMailDomain = orm['domains.MailDomain'] - for domain in OrigMailDomain.objects.all(): - NewMailDomain(domain=domain.domain, id=domain.id, created=domain.created).save() - - def backwards(self, orm): - "Write your backwards methods here." - OrigMailDomain = orm['domains.MailDomain'] - NewMailDomain = orm['managemails.MailDomain'] - for domain in OrigMailDomain.objects.all(): - NewMailDomain(domain=domain.domain, id=domain.id, created=domain.created).save() - - models = { - u'domains.maildomain': { - 'Meta': {'object_name': 'MailDomain'}, - 'created': ('model_utils.fields.AutoCreatedField', [], {'default': 'datetime.datetime.now'}), - 'domain': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '128'}), - u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'modified': ('model_utils.fields.AutoLastModifiedField', [], {'default': 'datetime.datetime.now'}) - }, - u'managemails.maildomain': { - 'Meta': {'object_name': 'MailDomain'}, - 'created': ('model_utils.fields.AutoCreatedField', [], {'default': 'datetime.datetime.now'}), - 'domain': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '128'}), - u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'modified': ('model_utils.fields.AutoLastModifiedField', [], {'default': 'datetime.datetime.now'}) - }, - u'managemails.mailaddress': { - 'Meta': {'unique_together': "(('localpart', 'domain'),)", 'object_name': 'MailAddress'}, - 'active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'created': ('model_utils.fields.AutoCreatedField', [], {'default': 'datetime.datetime.now'}), - 'domain': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['domains.MailDomain']"}), - u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'localpart': ('django.db.models.fields.CharField', [], {'max_length': '128'}), - 'modified': ('model_utils.fields.AutoLastModifiedField', [], {'default': 'datetime.datetime.now'}) - }, - u'managemails.mailaddressforward': { - 'Meta': {'unique_together': "(('mailaddress', 'target'),)", 'object_name': 'MailAddressForward'}, - 'created': ('model_utils.fields.AutoCreatedField', [], {'default': 'datetime.datetime.now'}), - u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'mailaddress': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['managemails.MailAddress']"}), - 'modified': ('model_utils.fields.AutoLastModifiedField', [], {'default': 'datetime.datetime.now'}), - 'target': ('django.db.models.fields.EmailField', [], {'max_length': '254'}) - }, - u'managemails.mailaddressmailbox': { - 'Meta': {'unique_together': "(('mailaddress', 'mailbox'),)", 'object_name': 'MailAddressMailbox'}, - 'created': ('model_utils.fields.AutoCreatedField', [], {'default': 'datetime.datetime.now'}), - 'mailaddress': ('django.db.models.fields.related.OneToOneField', [], {'to': u"orm['managemails.MailAddress']", 'unique': 'True', 'primary_key': 'True'}), - 'mailbox': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['managemails.Mailbox']"}), - 'modified': ('model_utils.fields.AutoLastModifiedField', [], {'default': 'datetime.datetime.now'}) - }, - u'managemails.mailbox': { - 'Meta': {'object_name': 'Mailbox'}, - 'active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'created': ('model_utils.fields.AutoCreatedField', [], {'default': 'datetime.datetime.now'}), - u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'modified': ('model_utils.fields.AutoLastModifiedField', [], {'default': 'datetime.datetime.now'}), - 'osuser': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['osusers.User']"}), - 'password': ('django.db.models.fields.CharField', [], {'max_length': '255'}), - 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '128'}) - }, - u'osusers.group': { - 'Meta': {'object_name': 'Group'}, - 'created': ('model_utils.fields.AutoCreatedField', [], {'default': 'datetime.datetime.now'}), - 'descr': ('django.db.models.fields.TextField', [], {'blank': 'True'}), - 'gid': ('django.db.models.fields.PositiveSmallIntegerField', [], {'unique': 'True', 'primary_key': 'True'}), - 'groupname': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '16'}), - 'modified': ('model_utils.fields.AutoLastModifiedField', [], {'default': 'datetime.datetime.now'}), - 'passwd': ('django.db.models.fields.CharField', [], {'max_length': '128', 'blank': 'True'}) - }, - u'osusers.user': { - 'Meta': {'object_name': 'User'}, - 'created': ('model_utils.fields.AutoCreatedField', [], {'default': 'datetime.datetime.now'}), - 'gecos': ('django.db.models.fields.CharField', [], {'max_length': '128', 'blank': 'True'}), - 'group': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['osusers.Group']"}), - 'homedir': ('django.db.models.fields.CharField', [], {'max_length': '256'}), - 'modified': ('model_utils.fields.AutoLastModifiedField', [], {'default': 'datetime.datetime.now'}), - 'shell': ('django.db.models.fields.CharField', [], {'max_length': '64'}), - 'uid': ('django.db.models.fields.PositiveSmallIntegerField', [], {'unique': 'True', 'primary_key': 'True'}), - 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '64'}) - } - } - - complete_apps = ['managemails'] - symmetrical = True diff --git a/gnuviechadmin/managemails/migrations/0009_auto__del_maildomain__del_field_mailbox_uid__chg_field_mailaddress_dom.py b/gnuviechadmin/managemails/migrations/0009_auto__del_maildomain__del_field_mailbox_uid__chg_field_mailaddress_dom.py deleted file mode 100644 index fd26c9f..0000000 --- a/gnuviechadmin/managemails/migrations/0009_auto__del_maildomain__del_field_mailbox_uid__chg_field_mailaddress_dom.py +++ /dev/null @@ -1,84 +0,0 @@ -# -*- coding: utf-8 -*- -# pymode:lint_ignore=E501 -from south.db import db -from south.v2 import SchemaMigration - - -class Migration(SchemaMigration): - - def forwards(self, orm): - # Deleting model 'MailDomain' - db.delete_table(u'managemails_maildomain') - - # Changing field 'MailAddress.domain' - db.alter_column(u'managemails_mailaddress', 'domain_id', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['domains.MailDomain'])) - - def backwards(self, orm): - # Adding model 'MailDomain' - raise RuntimeError("Backward migration is not supported.") - - models = { - u'domains.maildomain': { - 'Meta': {'object_name': 'MailDomain'}, - 'created': ('model_utils.fields.AutoCreatedField', [], {'default': 'datetime.datetime.now'}), - 'domain': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '128'}), - u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'modified': ('model_utils.fields.AutoLastModifiedField', [], {'default': 'datetime.datetime.now'}) - }, - u'managemails.mailaddress': { - 'Meta': {'unique_together': "(('localpart', 'domain'),)", 'object_name': 'MailAddress'}, - 'active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'created': ('model_utils.fields.AutoCreatedField', [], {'default': 'datetime.datetime.now'}), - 'domain': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['domains.MailDomain']"}), - u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'localpart': ('django.db.models.fields.CharField', [], {'max_length': '128'}), - 'modified': ('model_utils.fields.AutoLastModifiedField', [], {'default': 'datetime.datetime.now'}) - }, - u'managemails.mailaddressforward': { - 'Meta': {'unique_together': "(('mailaddress', 'target'),)", 'object_name': 'MailAddressForward'}, - 'created': ('model_utils.fields.AutoCreatedField', [], {'default': 'datetime.datetime.now'}), - u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'mailaddress': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['managemails.MailAddress']"}), - 'modified': ('model_utils.fields.AutoLastModifiedField', [], {'default': 'datetime.datetime.now'}), - 'target': ('django.db.models.fields.EmailField', [], {'max_length': '254'}) - }, - u'managemails.mailaddressmailbox': { - 'Meta': {'unique_together': "(('mailaddress', 'mailbox'),)", 'object_name': 'MailAddressMailbox'}, - 'created': ('model_utils.fields.AutoCreatedField', [], {'default': 'datetime.datetime.now'}), - 'mailaddress': ('django.db.models.fields.related.OneToOneField', [], {'to': u"orm['managemails.MailAddress']", 'unique': 'True', 'primary_key': 'True'}), - 'mailbox': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['managemails.Mailbox']"}), - 'modified': ('model_utils.fields.AutoLastModifiedField', [], {'default': 'datetime.datetime.now'}) - }, - u'managemails.mailbox': { - 'Meta': {'object_name': 'Mailbox'}, - 'active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'created': ('model_utils.fields.AutoCreatedField', [], {'default': 'datetime.datetime.now'}), - u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'modified': ('model_utils.fields.AutoLastModifiedField', [], {'default': 'datetime.datetime.now'}), - 'osuser': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['osusers.User']"}), - 'password': ('django.db.models.fields.CharField', [], {'max_length': '255'}), - 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '128'}) - }, - u'osusers.group': { - 'Meta': {'object_name': 'Group'}, - 'created': ('model_utils.fields.AutoCreatedField', [], {'default': 'datetime.datetime.now'}), - 'descr': ('django.db.models.fields.TextField', [], {'blank': 'True'}), - 'gid': ('django.db.models.fields.PositiveSmallIntegerField', [], {'unique': 'True', 'primary_key': 'True'}), - 'groupname': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '16'}), - 'modified': ('model_utils.fields.AutoLastModifiedField', [], {'default': 'datetime.datetime.now'}), - 'passwd': ('django.db.models.fields.CharField', [], {'max_length': '128', 'blank': 'True'}) - }, - u'osusers.user': { - 'Meta': {'object_name': 'User'}, - 'created': ('model_utils.fields.AutoCreatedField', [], {'default': 'datetime.datetime.now'}), - 'gecos': ('django.db.models.fields.CharField', [], {'max_length': '128', 'blank': 'True'}), - 'group': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['osusers.Group']"}), - 'homedir': ('django.db.models.fields.CharField', [], {'max_length': '256'}), - 'modified': ('model_utils.fields.AutoLastModifiedField', [], {'default': 'datetime.datetime.now'}), - 'shell': ('django.db.models.fields.CharField', [], {'max_length': '64'}), - 'uid': ('django.db.models.fields.PositiveSmallIntegerField', [], {'unique': 'True', 'primary_key': 'True'}), - 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '64'}) - } - } - - complete_apps = ['managemails'] diff --git a/gnuviechadmin/osusers/admin.py b/gnuviechadmin/osusers/admin.py index fb21576..4e74a04 100644 --- a/gnuviechadmin/osusers/admin.py +++ b/gnuviechadmin/osusers/admin.py @@ -110,7 +110,7 @@ class UserAdmin(admin.ModelAdmin): if obj is None: defaults.update({ 'form': self.add_form, - 'fields': admin.util.flatten_fieldsets(self.add_fieldsets), + 'fields': admin.options.flatten_fieldsets(self.add_fieldsets), }) defaults.update(kwargs) return super(UserAdmin, self).get_form(request, obj, **defaults) diff --git a/gnuviechadmin/osusers/migrations/0001_initial.py b/gnuviechadmin/osusers/migrations/0001_initial.py index 1dfc7e2..7c3d023 100644 --- a/gnuviechadmin/osusers/migrations/0001_initial.py +++ b/gnuviechadmin/osusers/migrations/0001_initial.py @@ -1,98 +1,158 @@ # -*- coding: utf-8 -*- -from south.utils import datetime_utils as datetime -from south.db import db -from south.v2 import SchemaMigration -from django.db import models +from __future__ import unicode_literals + +from django.db import models, migrations +import django.utils.timezone +import model_utils.fields -class Migration(SchemaMigration): +class Migration(migrations.Migration): - def forwards(self, orm): - # Adding model 'Group' - db.create_table(u'osusers_group', ( - ('created', self.gf('model_utils.fields.AutoCreatedField')(default=datetime.datetime.now)), - ('modified', self.gf('model_utils.fields.AutoLastModifiedField')(default=datetime.datetime.now)), - ('groupname', self.gf('django.db.models.fields.CharField')(unique=True, max_length=16)), - ('gid', self.gf('django.db.models.fields.PositiveSmallIntegerField')(unique=True, primary_key=True)), - ('descr', self.gf('django.db.models.fields.TextField')(blank=True)), - ('passwd', self.gf('django.db.models.fields.CharField')(max_length=128, blank=True)), - )) - db.send_create_signal(u'osusers', ['Group']) + dependencies = [ + ] - # Adding model 'User' - db.create_table(u'osusers_user', ( - ('created', self.gf('model_utils.fields.AutoCreatedField')(default=datetime.datetime.now)), - ('modified', self.gf('model_utils.fields.AutoLastModifiedField')(default=datetime.datetime.now)), - ('username', self.gf('django.db.models.fields.CharField')(unique=True, max_length=64)), - ('uid', self.gf('django.db.models.fields.PositiveSmallIntegerField')(unique=True, primary_key=True)), - ('group', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['osusers.Group'])), - ('gecos', self.gf('django.db.models.fields.CharField')(max_length=128, blank=True)), - ('homedir', self.gf('django.db.models.fields.CharField')(max_length=256)), - ('shell', self.gf('django.db.models.fields.CharField')(max_length=64)), - )) - db.send_create_signal(u'osusers', ['User']) - - # Adding model 'Shadow' - db.create_table(u'osusers_shadow', ( - ('created', self.gf('model_utils.fields.AutoCreatedField')(default=datetime.datetime.now)), - ('modified', self.gf('model_utils.fields.AutoLastModifiedField')(default=datetime.datetime.now)), - ('user', self.gf('django.db.models.fields.related.OneToOneField')(to=orm['osusers.User'], unique=True, primary_key=True)), - ('passwd', self.gf('django.db.models.fields.CharField')(max_length=128)), - ('changedays', self.gf('django.db.models.fields.PositiveSmallIntegerField')(null=True, blank=True)), - ('minage', self.gf('django.db.models.fields.PositiveSmallIntegerField')(null=True, blank=True)), - ('maxage', self.gf('django.db.models.fields.PositiveSmallIntegerField')(null=True, blank=True)), - ('gracedays', self.gf('django.db.models.fields.PositiveSmallIntegerField')(null=True, blank=True)), - ('inactdays', self.gf('django.db.models.fields.PositiveSmallIntegerField')(null=True, blank=True)), - ('expiredays', self.gf('django.db.models.fields.PositiveSmallIntegerField')(default=None, null=True, blank=True)), - )) - db.send_create_signal(u'osusers', ['Shadow']) - - - def backwards(self, orm): - # Deleting model 'Group' - db.delete_table(u'osusers_group') - - # Deleting model 'User' - db.delete_table(u'osusers_user') - - # Deleting model 'Shadow' - db.delete_table(u'osusers_shadow') - - - models = { - u'osusers.group': { - 'Meta': {'object_name': 'Group'}, - 'created': ('model_utils.fields.AutoCreatedField', [], {'default': 'datetime.datetime.now'}), - 'descr': ('django.db.models.fields.TextField', [], {'blank': 'True'}), - 'gid': ('django.db.models.fields.PositiveSmallIntegerField', [], {'unique': 'True', 'primary_key': 'True'}), - 'groupname': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '16'}), - 'modified': ('model_utils.fields.AutoLastModifiedField', [], {'default': 'datetime.datetime.now'}), - 'passwd': ('django.db.models.fields.CharField', [], {'max_length': '128', 'blank': 'True'}) - }, - u'osusers.shadow': { - 'Meta': {'object_name': 'Shadow'}, - 'changedays': ('django.db.models.fields.PositiveSmallIntegerField', [], {'null': 'True', 'blank': 'True'}), - 'created': ('model_utils.fields.AutoCreatedField', [], {'default': 'datetime.datetime.now'}), - 'expiredays': ('django.db.models.fields.PositiveSmallIntegerField', [], {'default': 'None', 'null': 'True', 'blank': 'True'}), - 'gracedays': ('django.db.models.fields.PositiveSmallIntegerField', [], {'null': 'True', 'blank': 'True'}), - 'inactdays': ('django.db.models.fields.PositiveSmallIntegerField', [], {'null': 'True', 'blank': 'True'}), - 'maxage': ('django.db.models.fields.PositiveSmallIntegerField', [], {'null': 'True', 'blank': 'True'}), - 'minage': ('django.db.models.fields.PositiveSmallIntegerField', [], {'null': 'True', 'blank': 'True'}), - 'modified': ('model_utils.fields.AutoLastModifiedField', [], {'default': 'datetime.datetime.now'}), - 'passwd': ('django.db.models.fields.CharField', [], {'max_length': '128'}), - 'user': ('django.db.models.fields.related.OneToOneField', [], {'to': u"orm['osusers.User']", 'unique': 'True', 'primary_key': 'True'}) - }, - u'osusers.user': { - 'Meta': {'object_name': 'User'}, - 'created': ('model_utils.fields.AutoCreatedField', [], {'default': 'datetime.datetime.now'}), - 'gecos': ('django.db.models.fields.CharField', [], {'max_length': '128', 'blank': 'True'}), - 'group': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['osusers.Group']"}), - 'homedir': ('django.db.models.fields.CharField', [], {'max_length': '256'}), - 'modified': ('model_utils.fields.AutoLastModifiedField', [], {'default': 'datetime.datetime.now'}), - 'shell': ('django.db.models.fields.CharField', [], {'max_length': '64'}), - 'uid': ('django.db.models.fields.PositiveSmallIntegerField', [], {'unique': 'True', 'primary_key': 'True'}), - 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '64'}) - } - } - - complete_apps = ['osusers'] \ No newline at end of file + operations = [ + migrations.CreateModel( + name='AdditionalGroup', + fields=[ + ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), + ('created', model_utils.fields.AutoCreatedField(default=django.utils.timezone.now, verbose_name='created', editable=False)), + ('modified', model_utils.fields.AutoLastModifiedField(default=django.utils.timezone.now, verbose_name='modified', editable=False)), + ], + options={ + 'verbose_name': 'Additional group', + 'verbose_name_plural': 'Additional groups', + }, + bases=(models.Model,), + ), + migrations.CreateModel( + name='DeleteTaskResult', + fields=[ + ('created', model_utils.fields.AutoCreatedField(default=django.utils.timezone.now, verbose_name='created', editable=False)), + ('modified', model_utils.fields.AutoLastModifiedField(default=django.utils.timezone.now, verbose_name='modified', editable=False)), + ('task_uuid', models.CharField(max_length=64, serialize=False, primary_key=True)), + ('task_name', models.CharField(max_length=255, db_index=True)), + ('is_finished', models.BooleanField(default=False)), + ('is_success', models.BooleanField(default=False)), + ('state', models.CharField(max_length=10)), + ('result_body', models.TextField(blank=True)), + ('modeltype', models.CharField(max_length=20, db_index=True)), + ('modelname', models.CharField(max_length=255)), + ], + options={ + 'abstract': False, + }, + bases=(models.Model,), + ), + migrations.CreateModel( + name='Group', + fields=[ + ('created', model_utils.fields.AutoCreatedField(default=django.utils.timezone.now, verbose_name='created', editable=False)), + ('modified', model_utils.fields.AutoLastModifiedField(default=django.utils.timezone.now, verbose_name='modified', editable=False)), + ('groupname', models.CharField(unique=True, max_length=16, verbose_name='Group name')), + ('gid', models.PositiveSmallIntegerField(unique=True, serialize=False, verbose_name='Group ID', primary_key=True)), + ('descr', models.TextField(verbose_name='Description', blank=True)), + ('passwd', models.CharField(max_length=128, verbose_name='Group password', blank=True)), + ], + options={ + 'verbose_name': 'Group', + 'verbose_name_plural': 'Groups', + }, + bases=(models.Model,), + ), + migrations.CreateModel( + name='GroupTaskResult', + fields=[ + ('created', model_utils.fields.AutoCreatedField(default=django.utils.timezone.now, verbose_name='created', editable=False)), + ('modified', model_utils.fields.AutoLastModifiedField(default=django.utils.timezone.now, verbose_name='modified', editable=False)), + ('task_uuid', models.CharField(max_length=64, serialize=False, primary_key=True)), + ('task_name', models.CharField(max_length=255, db_index=True)), + ('is_finished', models.BooleanField(default=False)), + ('is_success', models.BooleanField(default=False)), + ('state', models.CharField(max_length=10)), + ('result_body', models.TextField(blank=True)), + ('group', models.ForeignKey(to='osusers.Group')), + ], + options={ + 'abstract': False, + }, + bases=(models.Model,), + ), + migrations.CreateModel( + name='User', + fields=[ + ('created', model_utils.fields.AutoCreatedField(default=django.utils.timezone.now, verbose_name='created', editable=False)), + ('modified', model_utils.fields.AutoLastModifiedField(default=django.utils.timezone.now, verbose_name='modified', editable=False)), + ('username', models.CharField(unique=True, max_length=64, verbose_name='User name')), + ('uid', models.PositiveSmallIntegerField(unique=True, serialize=False, verbose_name='User ID', primary_key=True)), + ('gecos', models.CharField(max_length=128, verbose_name='Gecos field', blank=True)), + ('homedir', models.CharField(max_length=256, verbose_name='Home directory')), + ('shell', models.CharField(max_length=64, verbose_name='Login shell')), + ], + options={ + 'verbose_name': 'Benutzer', + 'verbose_name_plural': 'Users', + }, + bases=(models.Model,), + ), + migrations.CreateModel( + name='Shadow', + fields=[ + ('created', model_utils.fields.AutoCreatedField(default=django.utils.timezone.now, verbose_name='created', editable=False)), + ('modified', model_utils.fields.AutoLastModifiedField(default=django.utils.timezone.now, verbose_name='modified', editable=False)), + ('user', models.OneToOneField(primary_key=True, serialize=False, to='osusers.User', verbose_name='Benutzer')), + ('passwd', models.CharField(max_length=128, verbose_name='Encrypted password')), + ('changedays', models.PositiveSmallIntegerField(help_text='This is expressed in days since Jan 1, 1970', null=True, verbose_name='Date of last change', blank=True)), + ('minage', models.PositiveSmallIntegerField(help_text='Minimum number of days before the password can be changed', null=True, verbose_name='Minimum age', blank=True)), + ('maxage', models.PositiveSmallIntegerField(help_text='Maximum number of days after which the password has to be changed', null=True, verbose_name='Maximum age', blank=True)), + ('gracedays', models.PositiveSmallIntegerField(help_text='The number of days before the password is going to expire', null=True, verbose_name='Grace period', blank=True)), + ('inactdays', models.PositiveSmallIntegerField(help_text='The number of days after the password has expired during which the password should still be accepted', null=True, verbose_name='Inactivity period', blank=True)), + ('expiredays', models.PositiveSmallIntegerField(default=None, help_text='The date of expiration of the account, expressed as number of days since Jan 1, 1970', null=True, verbose_name='Account expiration date', blank=True)), + ], + options={ + 'verbose_name': 'Shadow password', + 'verbose_name_plural': 'Shadow passwords', + }, + bases=(models.Model,), + ), + migrations.CreateModel( + name='UserTaskResult', + fields=[ + ('created', model_utils.fields.AutoCreatedField(default=django.utils.timezone.now, verbose_name='created', editable=False)), + ('modified', model_utils.fields.AutoLastModifiedField(default=django.utils.timezone.now, verbose_name='modified', editable=False)), + ('task_uuid', models.CharField(max_length=64, serialize=False, primary_key=True)), + ('task_name', models.CharField(max_length=255, db_index=True)), + ('is_finished', models.BooleanField(default=False)), + ('is_success', models.BooleanField(default=False)), + ('state', models.CharField(max_length=10)), + ('result_body', models.TextField(blank=True)), + ('user', models.ForeignKey(to='osusers.User')), + ], + options={ + 'abstract': False, + }, + bases=(models.Model,), + ), + migrations.AddField( + model_name='user', + name='group', + field=models.ForeignKey(verbose_name='Group', to='osusers.Group'), + preserve_default=True, + ), + migrations.AddField( + model_name='additionalgroup', + name='group', + field=models.ForeignKey(to='osusers.Group'), + preserve_default=True, + ), + migrations.AddField( + model_name='additionalgroup', + name='user', + field=models.ForeignKey(to='osusers.User'), + preserve_default=True, + ), + migrations.AlterUniqueTogether( + name='additionalgroup', + unique_together=set([('user', 'group')]), + ), + ] diff --git a/gnuviechadmin/osusers/migrations/0002_auto__add_additionalgroup__add_unique_additionalgroup_user_group.py b/gnuviechadmin/osusers/migrations/0002_auto__add_additionalgroup__add_unique_additionalgroup_user_group.py deleted file mode 100644 index d5ef6d2..0000000 --- a/gnuviechadmin/osusers/migrations/0002_auto__add_additionalgroup__add_unique_additionalgroup_user_group.py +++ /dev/null @@ -1,77 +0,0 @@ -# -*- coding: utf-8 -*- -from south.utils import datetime_utils as datetime -from south.db import db -from south.v2 import SchemaMigration -from django.db import models - - -class Migration(SchemaMigration): - - def forwards(self, orm): - # Adding model 'AdditionalGroup' - db.create_table(u'osusers_additionalgroup', ( - (u'id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), - ('created', self.gf('model_utils.fields.AutoCreatedField')(default=datetime.datetime.now)), - ('modified', self.gf('model_utils.fields.AutoLastModifiedField')(default=datetime.datetime.now)), - ('user', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['osusers.User'])), - ('group', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['osusers.Group'])), - )) - db.send_create_signal(u'osusers', ['AdditionalGroup']) - - # Adding unique constraint on 'AdditionalGroup', fields ['user', 'group'] - db.create_unique(u'osusers_additionalgroup', ['user_id', 'group_id']) - - - def backwards(self, orm): - # Removing unique constraint on 'AdditionalGroup', fields ['user', 'group'] - db.delete_unique(u'osusers_additionalgroup', ['user_id', 'group_id']) - - # Deleting model 'AdditionalGroup' - db.delete_table(u'osusers_additionalgroup') - - - models = { - u'osusers.additionalgroup': { - 'Meta': {'unique_together': "(('user', 'group'),)", 'object_name': 'AdditionalGroup'}, - 'created': ('model_utils.fields.AutoCreatedField', [], {'default': 'datetime.datetime.now'}), - 'group': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['osusers.Group']"}), - u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'modified': ('model_utils.fields.AutoLastModifiedField', [], {'default': 'datetime.datetime.now'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['osusers.User']"}) - }, - u'osusers.group': { - 'Meta': {'object_name': 'Group'}, - 'created': ('model_utils.fields.AutoCreatedField', [], {'default': 'datetime.datetime.now'}), - 'descr': ('django.db.models.fields.TextField', [], {'blank': 'True'}), - 'gid': ('django.db.models.fields.PositiveSmallIntegerField', [], {'unique': 'True', 'primary_key': 'True'}), - 'groupname': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '16'}), - 'modified': ('model_utils.fields.AutoLastModifiedField', [], {'default': 'datetime.datetime.now'}), - 'passwd': ('django.db.models.fields.CharField', [], {'max_length': '128', 'blank': 'True'}) - }, - u'osusers.shadow': { - 'Meta': {'object_name': 'Shadow'}, - 'changedays': ('django.db.models.fields.PositiveSmallIntegerField', [], {'null': 'True', 'blank': 'True'}), - 'created': ('model_utils.fields.AutoCreatedField', [], {'default': 'datetime.datetime.now'}), - 'expiredays': ('django.db.models.fields.PositiveSmallIntegerField', [], {'default': 'None', 'null': 'True', 'blank': 'True'}), - 'gracedays': ('django.db.models.fields.PositiveSmallIntegerField', [], {'null': 'True', 'blank': 'True'}), - 'inactdays': ('django.db.models.fields.PositiveSmallIntegerField', [], {'null': 'True', 'blank': 'True'}), - 'maxage': ('django.db.models.fields.PositiveSmallIntegerField', [], {'null': 'True', 'blank': 'True'}), - 'minage': ('django.db.models.fields.PositiveSmallIntegerField', [], {'null': 'True', 'blank': 'True'}), - 'modified': ('model_utils.fields.AutoLastModifiedField', [], {'default': 'datetime.datetime.now'}), - 'passwd': ('django.db.models.fields.CharField', [], {'max_length': '128'}), - 'user': ('django.db.models.fields.related.OneToOneField', [], {'to': u"orm['osusers.User']", 'unique': 'True', 'primary_key': 'True'}) - }, - u'osusers.user': { - 'Meta': {'object_name': 'User'}, - 'created': ('model_utils.fields.AutoCreatedField', [], {'default': 'datetime.datetime.now'}), - 'gecos': ('django.db.models.fields.CharField', [], {'max_length': '128', 'blank': 'True'}), - 'group': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['osusers.Group']"}), - 'homedir': ('django.db.models.fields.CharField', [], {'max_length': '256'}), - 'modified': ('model_utils.fields.AutoLastModifiedField', [], {'default': 'datetime.datetime.now'}), - 'shell': ('django.db.models.fields.CharField', [], {'max_length': '64'}), - 'uid': ('django.db.models.fields.PositiveSmallIntegerField', [], {'unique': 'True', 'primary_key': 'True'}), - 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '64'}) - } - } - - complete_apps = ['osusers'] \ No newline at end of file diff --git a/gnuviechadmin/osusers/migrations/0003_auto__add_grouptaskresult__add_usertaskresult__add_deletetaskresult.py b/gnuviechadmin/osusers/migrations/0003_auto__add_grouptaskresult__add_usertaskresult__add_deletetaskresult.py deleted file mode 100644 index c23b290..0000000 --- a/gnuviechadmin/osusers/migrations/0003_auto__add_grouptaskresult__add_usertaskresult__add_deletetaskresult.py +++ /dev/null @@ -1,147 +0,0 @@ -# -*- coding: utf-8 -*- -from south.utils import datetime_utils as datetime -from south.db import db -from south.v2 import SchemaMigration -from django.db import models - - -class Migration(SchemaMigration): - - def forwards(self, orm): - # Adding model 'GroupTaskResult' - db.create_table(u'osusers_grouptaskresult', ( - ('created', self.gf('model_utils.fields.AutoCreatedField')(default=datetime.datetime.now)), - ('modified', self.gf('model_utils.fields.AutoLastModifiedField')(default=datetime.datetime.now)), - ('task_uuid', self.gf('django.db.models.fields.CharField')(max_length=64, primary_key=True)), - ('task_name', self.gf('django.db.models.fields.CharField')(max_length=255)), - ('is_finished', self.gf('django.db.models.fields.BooleanField')(default=False)), - ('is_success', self.gf('django.db.models.fields.BooleanField')(default=False)), - ('state', self.gf('django.db.models.fields.CharField')(max_length=10)), - ('result_body', self.gf('django.db.models.fields.TextField')(blank=True)), - ('group', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['osusers.Group'])), - )) - db.send_create_signal(u'osusers', ['GroupTaskResult']) - - # Adding model 'UserTaskResult' - db.create_table(u'osusers_usertaskresult', ( - ('created', self.gf('model_utils.fields.AutoCreatedField')(default=datetime.datetime.now)), - ('modified', self.gf('model_utils.fields.AutoLastModifiedField')(default=datetime.datetime.now)), - ('task_uuid', self.gf('django.db.models.fields.CharField')(max_length=64, primary_key=True)), - ('task_name', self.gf('django.db.models.fields.CharField')(max_length=255)), - ('is_finished', self.gf('django.db.models.fields.BooleanField')(default=False)), - ('is_success', self.gf('django.db.models.fields.BooleanField')(default=False)), - ('state', self.gf('django.db.models.fields.CharField')(max_length=10)), - ('result_body', self.gf('django.db.models.fields.TextField')(blank=True)), - ('user', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['osusers.User'])), - )) - db.send_create_signal(u'osusers', ['UserTaskResult']) - - # Adding model 'DeleteTaskResult' - db.create_table(u'osusers_deletetaskresult', ( - ('created', self.gf('model_utils.fields.AutoCreatedField')(default=datetime.datetime.now)), - ('modified', self.gf('model_utils.fields.AutoLastModifiedField')(default=datetime.datetime.now)), - ('task_uuid', self.gf('django.db.models.fields.CharField')(max_length=64, primary_key=True)), - ('task_name', self.gf('django.db.models.fields.CharField')(max_length=255)), - ('is_finished', self.gf('django.db.models.fields.BooleanField')(default=False)), - ('is_success', self.gf('django.db.models.fields.BooleanField')(default=False)), - ('state', self.gf('django.db.models.fields.CharField')(max_length=10)), - ('result_body', self.gf('django.db.models.fields.TextField')(blank=True)), - ('modeltype', self.gf('django.db.models.fields.CharField')(max_length=20, db_index=True)), - ('modelname', self.gf('django.db.models.fields.CharField')(max_length=255)), - )) - db.send_create_signal(u'osusers', ['DeleteTaskResult']) - - - def backwards(self, orm): - # Deleting model 'GroupTaskResult' - db.delete_table(u'osusers_grouptaskresult') - - # Deleting model 'UserTaskResult' - db.delete_table(u'osusers_usertaskresult') - - # Deleting model 'DeleteTaskResult' - db.delete_table(u'osusers_deletetaskresult') - - - models = { - u'osusers.additionalgroup': { - 'Meta': {'unique_together': "(('user', 'group'),)", 'object_name': 'AdditionalGroup'}, - 'created': ('model_utils.fields.AutoCreatedField', [], {'default': 'datetime.datetime.now'}), - 'group': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['osusers.Group']"}), - u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'modified': ('model_utils.fields.AutoLastModifiedField', [], {'default': 'datetime.datetime.now'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['osusers.User']"}) - }, - u'osusers.deletetaskresult': { - 'Meta': {'object_name': 'DeleteTaskResult'}, - 'created': ('model_utils.fields.AutoCreatedField', [], {'default': 'datetime.datetime.now'}), - 'is_finished': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'is_success': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'modelname': ('django.db.models.fields.CharField', [], {'max_length': '255'}), - 'modeltype': ('django.db.models.fields.CharField', [], {'max_length': '20', 'db_index': 'True'}), - 'modified': ('model_utils.fields.AutoLastModifiedField', [], {'default': 'datetime.datetime.now'}), - 'result_body': ('django.db.models.fields.TextField', [], {'blank': 'True'}), - 'state': ('django.db.models.fields.CharField', [], {'max_length': '10'}), - 'task_name': ('django.db.models.fields.CharField', [], {'max_length': '255'}), - 'task_uuid': ('django.db.models.fields.CharField', [], {'max_length': '64', 'primary_key': 'True'}) - }, - u'osusers.group': { - 'Meta': {'object_name': 'Group'}, - 'created': ('model_utils.fields.AutoCreatedField', [], {'default': 'datetime.datetime.now'}), - 'descr': ('django.db.models.fields.TextField', [], {'blank': 'True'}), - 'gid': ('django.db.models.fields.PositiveSmallIntegerField', [], {'unique': 'True', 'primary_key': 'True'}), - 'groupname': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '16'}), - 'modified': ('model_utils.fields.AutoLastModifiedField', [], {'default': 'datetime.datetime.now'}), - 'passwd': ('django.db.models.fields.CharField', [], {'max_length': '128', 'blank': 'True'}) - }, - u'osusers.grouptaskresult': { - 'Meta': {'object_name': 'GroupTaskResult'}, - 'created': ('model_utils.fields.AutoCreatedField', [], {'default': 'datetime.datetime.now'}), - 'group': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['osusers.Group']"}), - 'is_finished': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'is_success': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'modified': ('model_utils.fields.AutoLastModifiedField', [], {'default': 'datetime.datetime.now'}), - 'result_body': ('django.db.models.fields.TextField', [], {'blank': 'True'}), - 'state': ('django.db.models.fields.CharField', [], {'max_length': '10'}), - 'task_name': ('django.db.models.fields.CharField', [], {'max_length': '255'}), - 'task_uuid': ('django.db.models.fields.CharField', [], {'max_length': '64', 'primary_key': 'True'}) - }, - u'osusers.shadow': { - 'Meta': {'object_name': 'Shadow'}, - 'changedays': ('django.db.models.fields.PositiveSmallIntegerField', [], {'null': 'True', 'blank': 'True'}), - 'created': ('model_utils.fields.AutoCreatedField', [], {'default': 'datetime.datetime.now'}), - 'expiredays': ('django.db.models.fields.PositiveSmallIntegerField', [], {'default': 'None', 'null': 'True', 'blank': 'True'}), - 'gracedays': ('django.db.models.fields.PositiveSmallIntegerField', [], {'null': 'True', 'blank': 'True'}), - 'inactdays': ('django.db.models.fields.PositiveSmallIntegerField', [], {'null': 'True', 'blank': 'True'}), - 'maxage': ('django.db.models.fields.PositiveSmallIntegerField', [], {'null': 'True', 'blank': 'True'}), - 'minage': ('django.db.models.fields.PositiveSmallIntegerField', [], {'null': 'True', 'blank': 'True'}), - 'modified': ('model_utils.fields.AutoLastModifiedField', [], {'default': 'datetime.datetime.now'}), - 'passwd': ('django.db.models.fields.CharField', [], {'max_length': '128'}), - 'user': ('django.db.models.fields.related.OneToOneField', [], {'to': u"orm['osusers.User']", 'unique': 'True', 'primary_key': 'True'}) - }, - u'osusers.user': { - 'Meta': {'object_name': 'User'}, - 'created': ('model_utils.fields.AutoCreatedField', [], {'default': 'datetime.datetime.now'}), - 'gecos': ('django.db.models.fields.CharField', [], {'max_length': '128', 'blank': 'True'}), - 'group': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['osusers.Group']"}), - 'homedir': ('django.db.models.fields.CharField', [], {'max_length': '256'}), - 'modified': ('model_utils.fields.AutoLastModifiedField', [], {'default': 'datetime.datetime.now'}), - 'shell': ('django.db.models.fields.CharField', [], {'max_length': '64'}), - 'uid': ('django.db.models.fields.PositiveSmallIntegerField', [], {'unique': 'True', 'primary_key': 'True'}), - 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '64'}) - }, - u'osusers.usertaskresult': { - 'Meta': {'object_name': 'UserTaskResult'}, - 'created': ('model_utils.fields.AutoCreatedField', [], {'default': 'datetime.datetime.now'}), - 'is_finished': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'is_success': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'modified': ('model_utils.fields.AutoLastModifiedField', [], {'default': 'datetime.datetime.now'}), - 'result_body': ('django.db.models.fields.TextField', [], {'blank': 'True'}), - 'state': ('django.db.models.fields.CharField', [], {'max_length': '10'}), - 'task_name': ('django.db.models.fields.CharField', [], {'max_length': '255'}), - 'task_uuid': ('django.db.models.fields.CharField', [], {'max_length': '64', 'primary_key': 'True'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['osusers.User']"}) - } - } - - complete_apps = ['osusers'] \ No newline at end of file diff --git a/gnuviechadmin/osusers/migrations/0004_auto__add_index_grouptaskresult_task_name__add_index_usertaskresult_ta.py b/gnuviechadmin/osusers/migrations/0004_auto__add_index_grouptaskresult_task_name__add_index_usertaskresult_ta.py deleted file mode 100644 index 1657e0d..0000000 --- a/gnuviechadmin/osusers/migrations/0004_auto__add_index_grouptaskresult_task_name__add_index_usertaskresult_ta.py +++ /dev/null @@ -1,113 +0,0 @@ -# -*- coding: utf-8 -*- -from south.utils import datetime_utils as datetime -from south.db import db -from south.v2 import SchemaMigration -from django.db import models - - -class Migration(SchemaMigration): - - def forwards(self, orm): - # Adding index on 'GroupTaskResult', fields ['task_name'] - db.create_index(u'osusers_grouptaskresult', ['task_name']) - - # Adding index on 'UserTaskResult', fields ['task_name'] - db.create_index(u'osusers_usertaskresult', ['task_name']) - - # Adding index on 'DeleteTaskResult', fields ['task_name'] - db.create_index(u'osusers_deletetaskresult', ['task_name']) - - - def backwards(self, orm): - # Removing index on 'DeleteTaskResult', fields ['task_name'] - db.delete_index(u'osusers_deletetaskresult', ['task_name']) - - # Removing index on 'UserTaskResult', fields ['task_name'] - db.delete_index(u'osusers_usertaskresult', ['task_name']) - - # Removing index on 'GroupTaskResult', fields ['task_name'] - db.delete_index(u'osusers_grouptaskresult', ['task_name']) - - - models = { - u'osusers.additionalgroup': { - 'Meta': {'unique_together': "(('user', 'group'),)", 'object_name': 'AdditionalGroup'}, - 'created': ('model_utils.fields.AutoCreatedField', [], {'default': 'datetime.datetime.now'}), - 'group': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['osusers.Group']"}), - u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'modified': ('model_utils.fields.AutoLastModifiedField', [], {'default': 'datetime.datetime.now'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['osusers.User']"}) - }, - u'osusers.deletetaskresult': { - 'Meta': {'object_name': 'DeleteTaskResult'}, - 'created': ('model_utils.fields.AutoCreatedField', [], {'default': 'datetime.datetime.now'}), - 'is_finished': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'is_success': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'modelname': ('django.db.models.fields.CharField', [], {'max_length': '255'}), - 'modeltype': ('django.db.models.fields.CharField', [], {'max_length': '20', 'db_index': 'True'}), - 'modified': ('model_utils.fields.AutoLastModifiedField', [], {'default': 'datetime.datetime.now'}), - 'result_body': ('django.db.models.fields.TextField', [], {'blank': 'True'}), - 'state': ('django.db.models.fields.CharField', [], {'max_length': '10'}), - 'task_name': ('django.db.models.fields.CharField', [], {'max_length': '255', 'db_index': 'True'}), - 'task_uuid': ('django.db.models.fields.CharField', [], {'max_length': '64', 'primary_key': 'True'}) - }, - u'osusers.group': { - 'Meta': {'object_name': 'Group'}, - 'created': ('model_utils.fields.AutoCreatedField', [], {'default': 'datetime.datetime.now'}), - 'descr': ('django.db.models.fields.TextField', [], {'blank': 'True'}), - 'gid': ('django.db.models.fields.PositiveSmallIntegerField', [], {'unique': 'True', 'primary_key': 'True'}), - 'groupname': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '16'}), - 'modified': ('model_utils.fields.AutoLastModifiedField', [], {'default': 'datetime.datetime.now'}), - 'passwd': ('django.db.models.fields.CharField', [], {'max_length': '128', 'blank': 'True'}) - }, - u'osusers.grouptaskresult': { - 'Meta': {'object_name': 'GroupTaskResult'}, - 'created': ('model_utils.fields.AutoCreatedField', [], {'default': 'datetime.datetime.now'}), - 'group': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['osusers.Group']"}), - 'is_finished': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'is_success': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'modified': ('model_utils.fields.AutoLastModifiedField', [], {'default': 'datetime.datetime.now'}), - 'result_body': ('django.db.models.fields.TextField', [], {'blank': 'True'}), - 'state': ('django.db.models.fields.CharField', [], {'max_length': '10'}), - 'task_name': ('django.db.models.fields.CharField', [], {'max_length': '255', 'db_index': 'True'}), - 'task_uuid': ('django.db.models.fields.CharField', [], {'max_length': '64', 'primary_key': 'True'}) - }, - u'osusers.shadow': { - 'Meta': {'object_name': 'Shadow'}, - 'changedays': ('django.db.models.fields.PositiveSmallIntegerField', [], {'null': 'True', 'blank': 'True'}), - 'created': ('model_utils.fields.AutoCreatedField', [], {'default': 'datetime.datetime.now'}), - 'expiredays': ('django.db.models.fields.PositiveSmallIntegerField', [], {'default': 'None', 'null': 'True', 'blank': 'True'}), - 'gracedays': ('django.db.models.fields.PositiveSmallIntegerField', [], {'null': 'True', 'blank': 'True'}), - 'inactdays': ('django.db.models.fields.PositiveSmallIntegerField', [], {'null': 'True', 'blank': 'True'}), - 'maxage': ('django.db.models.fields.PositiveSmallIntegerField', [], {'null': 'True', 'blank': 'True'}), - 'minage': ('django.db.models.fields.PositiveSmallIntegerField', [], {'null': 'True', 'blank': 'True'}), - 'modified': ('model_utils.fields.AutoLastModifiedField', [], {'default': 'datetime.datetime.now'}), - 'passwd': ('django.db.models.fields.CharField', [], {'max_length': '128'}), - 'user': ('django.db.models.fields.related.OneToOneField', [], {'to': u"orm['osusers.User']", 'unique': 'True', 'primary_key': 'True'}) - }, - u'osusers.user': { - 'Meta': {'object_name': 'User'}, - 'created': ('model_utils.fields.AutoCreatedField', [], {'default': 'datetime.datetime.now'}), - 'gecos': ('django.db.models.fields.CharField', [], {'max_length': '128', 'blank': 'True'}), - 'group': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['osusers.Group']"}), - 'homedir': ('django.db.models.fields.CharField', [], {'max_length': '256'}), - 'modified': ('model_utils.fields.AutoLastModifiedField', [], {'default': 'datetime.datetime.now'}), - 'shell': ('django.db.models.fields.CharField', [], {'max_length': '64'}), - 'uid': ('django.db.models.fields.PositiveSmallIntegerField', [], {'unique': 'True', 'primary_key': 'True'}), - 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '64'}) - }, - u'osusers.usertaskresult': { - 'Meta': {'object_name': 'UserTaskResult'}, - 'created': ('model_utils.fields.AutoCreatedField', [], {'default': 'datetime.datetime.now'}), - 'is_finished': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'is_success': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'modified': ('model_utils.fields.AutoLastModifiedField', [], {'default': 'datetime.datetime.now'}), - 'result_body': ('django.db.models.fields.TextField', [], {'blank': 'True'}), - 'state': ('django.db.models.fields.CharField', [], {'max_length': '10'}), - 'task_name': ('django.db.models.fields.CharField', [], {'max_length': '255', 'db_index': 'True'}), - 'task_uuid': ('django.db.models.fields.CharField', [], {'max_length': '64', 'primary_key': 'True'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['osusers.User']"}) - } - } - - complete_apps = ['osusers'] \ No newline at end of file diff --git a/gnuviechadmin/osusers/models.py b/gnuviechadmin/osusers/models.py index 6ad01b9..801f6ba 100644 --- a/gnuviechadmin/osusers/models.py +++ b/gnuviechadmin/osusers/models.py @@ -1,7 +1,7 @@ from datetime import date import os -from django.db import models +from django.db import models, transaction from django.conf import settings from django.core.exceptions import ValidationError from django.utils import timezone @@ -176,6 +176,7 @@ class UserManager(models.Manager): break return nextuser + @transaction.atomic def create_user(self, username=None, password=None, commit=False): uid = self.get_next_uid() gid = Group.objects.get_next_gid() diff --git a/requirements/base.txt b/requirements/base.txt index f3b8dd8..7543bf5 100644 --- a/requirements/base.txt +++ b/requirements/base.txt @@ -1,13 +1,12 @@ -Django==1.6.5 -bpython==0.13 +Django==1.7.1 +bpython==0.13.1 django-braces==1.4.0 -django-model-utils==2.0.3 +django-model-utils==2.2 logutils==0.3.3 -South==0.8.4 -psycopg2==2.5.3 +psycopg2==2.5.4 passlib==1.6.2 -celery==3.1.11 -billiard==3.3.0.17 -kombu==3.0.16 -pytz==2014.3 -pyaml==14.05.7 +celery==3.1.17 +billiard==3.3.0.19 +kombu==3.0.24 +pytz==2014.10 +pyaml==14.12.10 diff --git a/requirements/local.txt b/requirements/local.txt index df01fa9..97a9db7 100644 --- a/requirements/local.txt +++ b/requirements/local.txt @@ -2,6 +2,7 @@ -r base.txt coverage==3.7.1 mock==1.0.1 -django-debug-toolbar==1.2.1 -Sphinx==1.2.2 -releases==0.6.1 +django-debug-toolbar==1.2.2 +sqlparse==0.1.14 +Sphinx==1.2.3 +releases==0.7.0