X-Git-Url: https://git.mdrn.pl/wolnelektury.git/blobdiff_plain/ae34def10b226251f0d752634a7de4f1a6b8775d..bf3f18ce9313f4929ff327fbf12803157de171cb:/apps/sponsors/migrations/0001_initial.py diff --git a/apps/sponsors/migrations/0001_initial.py b/apps/sponsors/migrations/0001_initial.py index 35eebaa6d..d672e846a 100644 --- a/apps/sponsors/migrations/0001_initial.py +++ b/apps/sponsors/migrations/0001_initial.py @@ -1,58 +1,40 @@ -# encoding: utf-8 -import datetime -from south.db import db -from south.v2 import SchemaMigration -from django.db import models +# -*- coding: utf-8 -*- +from __future__ import unicode_literals -class Migration(SchemaMigration): - - def forwards(self, orm): - - # Adding model 'Sponsor' - db.mock_model('sponsors_sponsor', ( - ('url', self.gf('django.db.models.fields.URLField')(max_length=200, blank=True)), - ('logo', self.gf('django.db.models.fields.files.ImageField')(max_length=100)), - ('_description', self.gf('django.db.models.fields.CharField')(max_length=255, blank=True)), - ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), - ('name', self.gf('django.db.models.fields.CharField')(max_length=120)), - )) - db.send_create_signal('sponsors', ['Sponsor']) +from django.db import models, migrations +import jsonfield.fields - # Adding model 'SponsorPage' - db.mock_model('sponsors_sponsorpage', ( - ('_html', self.gf('django.db.models.fields.TextField')(blank=True)), - ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), - ('sponsors', self.gf('sponsors.fields.JSONField')(default={})), - ('name', self.gf('django.db.models.fields.CharField')(max_length=120)), - )) - db.send_create_signal('sponsors', ['SponsorPage']) - - - def backwards(self, orm): - - # Deleting model 'Sponsor' - db.delete_table('sponsors_sponsor') - # Deleting model 'SponsorPage' - db.delete_table('sponsors_sponsorpage') - - - models = { - 'sponsors.sponsor': { - 'Meta': {'object_name': 'Sponsor'}, - '_description': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'logo': ('django.db.models.fields.files.ImageField', [], {'max_length': '100'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '120'}), - 'url': ('django.db.models.fields.URLField', [], {'max_length': '200', 'blank': 'True'}) - }, - 'sponsors.sponsorpage': { - 'Meta': {'object_name': 'SponsorPage'}, - '_html': ('django.db.models.fields.TextField', [], {'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '120'}), - 'sponsors': ('sponsors.fields.JSONField', [], {'default': '{}'}) - } - } - - complete_apps = ['sponsors'] +class Migration(migrations.Migration): + + dependencies = [ + ] + + operations = [ + migrations.CreateModel( + name='Sponsor', + fields=[ + ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), + ('name', models.CharField(max_length=120, verbose_name='name')), + ('_description', models.CharField(max_length=255, verbose_name='Description', blank=True)), + ('logo', models.ImageField(upload_to=b'sponsorzy/sponsor/logo', verbose_name='logo')), + ('url', models.URLField(verbose_name='url', blank=True)), + ], + options={ + }, + bases=(models.Model,), + ), + migrations.CreateModel( + name='SponsorPage', + fields=[ + ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), + ('name', models.CharField(max_length=120, verbose_name='name')), + ('sponsors', jsonfield.fields.JSONField(default={}, verbose_name='sponsors')), + ('_html', models.TextField(editable=False, blank=True)), + ('sprite', models.ImageField(upload_to=b'sponsorzy/sprite', blank=True)), + ], + options={ + }, + bases=(models.Model,), + ), + ]