From: Radek Czajka Date: Fri, 27 Sep 2019 13:48:31 +0000 (+0200) Subject: Django 1.7 + Makefile X-Git-Url: https://git.mdrn.pl/prawokultury.git/commitdiff_plain/370b43bc681fec1d643887d6c3693d6e10ca27ad Django 1.7 + Makefile --- diff --git a/.gitignore b/.gitignore index 8726538..2a67ec8 100644 --- a/.gitignore +++ b/.gitignore @@ -8,6 +8,7 @@ dev.sqlite # Compress output /static +*.css.map # Python garbage *.pyc diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..70d8ead --- /dev/null +++ b/Makefile @@ -0,0 +1,8 @@ +.PHONY: deploy + + +deploy: prawokultury/settings.d/local.py + pip install -r requirements.txt + ./manage.py migrate --noinput + ./manage.py collectstatic --noinput + diff --git a/chunks/migrations/0001_initial.py b/chunks/migrations/0001_initial.py index 1fd5e1d..20330fd 100644 --- a/chunks/migrations/0001_initial.py +++ b/chunks/migrations/0001_initial.py @@ -1,59 +1,46 @@ # -*- coding: utf-8 -*- -import datetime -from south.db import db -from south.v2 import SchemaMigration -from django.db import models - - -class Migration(SchemaMigration): - - def forwards(self, orm): - # Adding model 'Chunk' - db.create_table('chunks_chunk', ( - ('key', self.gf('django.db.models.fields.CharField')(max_length=255, primary_key=True)), - ('description', self.gf('django.db.models.fields.CharField')(max_length=255, blank=True)), - ('content_pl', self.gf('markupfield.fields.MarkupField')(rendered_field=True, blank=True)), - ('content_en', self.gf('markupfield.fields.MarkupField')(rendered_field=True, blank=True)), - ('content_pl_markup_type', self.gf('django.db.models.fields.CharField')(default=None, max_length=30, blank=True)), - ('content_en_markup_type', self.gf('django.db.models.fields.CharField')(default=None, max_length=30, blank=True)), - ('_content_pl_rendered', self.gf('django.db.models.fields.TextField')()), - ('_content_en_rendered', self.gf('django.db.models.fields.TextField')()), - )) - db.send_create_signal('chunks', ['Chunk']) - - # Adding model 'Attachment' - db.create_table('chunks_attachment', ( - ('key', self.gf('django.db.models.fields.CharField')(max_length=255, primary_key=True)), - ('attachment', self.gf('django.db.models.fields.files.FileField')(max_length=100)), - )) - db.send_create_signal('chunks', ['Attachment']) - - - def backwards(self, orm): - # Deleting model 'Chunk' - db.delete_table('chunks_chunk') - - # Deleting model 'Attachment' - db.delete_table('chunks_attachment') - - - models = { - 'chunks.attachment': { - 'Meta': {'ordering': "('key',)", 'object_name': 'Attachment'}, - 'attachment': ('django.db.models.fields.files.FileField', [], {'max_length': '100'}), - 'key': ('django.db.models.fields.CharField', [], {'max_length': '255', 'primary_key': 'True'}) - }, - 'chunks.chunk': { - 'Meta': {'ordering': "('key',)", 'object_name': 'Chunk'}, - '_content_en_rendered': ('django.db.models.fields.TextField', [], {}), - '_content_pl_rendered': ('django.db.models.fields.TextField', [], {}), - 'content_en': ('markupfield.fields.MarkupField', [], {'rendered_field': 'True', 'blank': 'True'}), - 'content_en_markup_type': ('django.db.models.fields.CharField', [], {'default': 'None', 'max_length': '30', 'blank': 'True'}), - 'content_pl': ('markupfield.fields.MarkupField', [], {'rendered_field': 'True', 'blank': 'True'}), - 'content_pl_markup_type': ('django.db.models.fields.CharField', [], {'default': 'None', 'max_length': '30', 'blank': 'True'}), - 'description': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}), - 'key': ('django.db.models.fields.CharField', [], {'max_length': '255', 'primary_key': 'True'}) - } - } - - complete_apps = ['chunks'] \ No newline at end of file +from __future__ import unicode_literals + +from django.db import models, migrations +import markupfield.fields + + +class Migration(migrations.Migration): + + dependencies = [ + ] + + operations = [ + migrations.CreateModel( + name='Attachment', + fields=[ + ('key', models.CharField(help_text='A unique name for this attachment', max_length=255, serialize=False, verbose_name='key', primary_key=True)), + ('attachment', models.FileField(upload_to=b'chunks/attachment')), + ], + options={ + 'ordering': ('key',), + 'verbose_name': 'attachment', + 'verbose_name_plural': 'attachments', + }, + bases=(models.Model,), + ), + migrations.CreateModel( + name='Chunk', + fields=[ + ('key', models.CharField(help_text='A unique name for this piece of content', max_length=255, serialize=False, verbose_name='key', primary_key=True)), + ('description', models.CharField(max_length=255, verbose_name='description', blank=True)), + ('content_pl', markupfield.fields.MarkupField(help_text='Use Textile syntax.', rendered_field=True, verbose_name='content', blank=True)), + ('content_en', markupfield.fields.MarkupField(help_text='Use Textile syntax.', rendered_field=True, verbose_name='content', blank=True)), + ('content_pl_markup_type', models.CharField(default=b'textile_pl', max_length=30, editable=False, choices=[(b'', b'--'), (b'textile_pl', b'textile_pl')])), + ('content_en_markup_type', models.CharField(default=b'textile_pl', max_length=30, editable=False, choices=[(b'', b'--'), (b'textile_pl', b'textile_pl')])), + ('_content_pl_rendered', models.TextField(editable=False)), + ('_content_en_rendered', models.TextField(editable=False)), + ], + options={ + 'ordering': ('key',), + 'verbose_name': 'piece', + 'verbose_name_plural': 'pieces', + }, + bases=(models.Model,), + ), + ] diff --git a/events/migrations/0001_initial.py b/events/migrations/0001_initial.py index 1230887..5bae52c 100644 --- a/events/migrations/0001_initial.py +++ b/events/migrations/0001_initial.py @@ -1,46 +1,36 @@ # -*- coding: utf-8 -*- -import datetime -from south.db import db -from south.v2 import SchemaMigration -from django.db import models - - -class Migration(SchemaMigration): - - def forwards(self, orm): - # Adding model 'Event' - db.create_table('events_event', ( - ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), - ('date', self.gf('django.db.models.fields.DateTimeField')(max_length=255, db_index=True)), - ('link', self.gf('django.db.models.fields.URLField')(max_length=200)), - ('title_pl', self.gf('django.db.models.fields.CharField')(max_length=255)), - ('title_en', self.gf('django.db.models.fields.CharField')(max_length=255)), - ('organizer_pl', self.gf('django.db.models.fields.CharField')(max_length=255, db_index=True)), - ('organizer_en', self.gf('django.db.models.fields.CharField')(max_length=255, db_index=True)), - ('place_pl', self.gf('django.db.models.fields.CharField')(max_length=255)), - ('place_en', self.gf('django.db.models.fields.CharField')(max_length=255)), - )) - db.send_create_signal('events', ['Event']) - - - def backwards(self, orm): - # Deleting model 'Event' - db.delete_table('events_event') - - - models = { - 'events.event': { - 'Meta': {'ordering': "['date']", 'object_name': 'Event'}, - 'date': ('django.db.models.fields.DateTimeField', [], {'max_length': '255', 'db_index': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'link': ('django.db.models.fields.URLField', [], {'max_length': '200'}), - 'organizer_en': ('django.db.models.fields.CharField', [], {'max_length': '255', 'db_index': 'True'}), - 'organizer_pl': ('django.db.models.fields.CharField', [], {'max_length': '255', 'db_index': 'True'}), - 'place_en': ('django.db.models.fields.CharField', [], {'max_length': '255'}), - 'place_pl': ('django.db.models.fields.CharField', [], {'max_length': '255'}), - 'title_en': ('django.db.models.fields.CharField', [], {'max_length': '255'}), - 'title_pl': ('django.db.models.fields.CharField', [], {'max_length': '255'}) - } - } - - complete_apps = ['events'] \ No newline at end of file +from __future__ import unicode_literals + +from django.db import models, migrations + + +class Migration(migrations.Migration): + + dependencies = [ + ] + + operations = [ + migrations.CreateModel( + name='Event', + fields=[ + ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), + ('date', models.DateTimeField(max_length=255, verbose_name='date', db_index=True)), + ('date_end', models.DateTimeField(db_index=True, max_length=255, verbose_name='end date', blank=True)), + ('link', models.URLField(verbose_name='link')), + ('title_pl', models.CharField(max_length=255, verbose_name='title', blank=True)), + ('title_en', models.CharField(max_length=255, verbose_name='title', blank=True)), + ('organizer_pl', models.CharField(db_index=True, max_length=255, verbose_name='organizer', blank=True)), + ('organizer_en', models.CharField(db_index=True, max_length=255, verbose_name='organizer', blank=True)), + ('place_pl', models.CharField(max_length=255, verbose_name='place', blank=True)), + ('place_en', models.CharField(max_length=255, verbose_name='place', blank=True)), + ('published_pl', models.BooleanField(default=False, verbose_name='published')), + ('published_en', models.BooleanField(default=False, verbose_name='published')), + ], + options={ + 'ordering': ['date'], + 'verbose_name': 'event', + 'verbose_name_plural': 'events', + }, + bases=(models.Model,), + ), + ] diff --git a/events/migrations/0002_auto__add_field_event_published_pl__add_field_event_published_en.py b/events/migrations/0002_auto__add_field_event_published_pl__add_field_event_published_en.py deleted file mode 100644 index a960391..0000000 --- a/events/migrations/0002_auto__add_field_event_published_pl__add_field_event_published_en.py +++ /dev/null @@ -1,50 +0,0 @@ -# -*- coding: utf-8 -*- -import datetime -from south.db import db -from south.v2 import SchemaMigration -from django.db import models - - -class Migration(SchemaMigration): - - def forwards(self, orm): - # Adding field 'Event.published_pl' - db.add_column('events_event', 'published_pl', - self.gf('django.db.models.fields.BooleanField')(default=False), - keep_default=False) - - # Adding field 'Event.published_en' - db.add_column('events_event', 'published_en', - self.gf('django.db.models.fields.BooleanField')(default=False), - keep_default=False) - - if not db.dry_run: - orm.Event.objects.all().update(published_pl=True, published_en=True) - - - def backwards(self, orm): - # Deleting field 'Event.published_pl' - db.delete_column('events_event', 'published_pl') - - # Deleting field 'Event.published_en' - db.delete_column('events_event', 'published_en') - - - models = { - 'events.event': { - 'Meta': {'ordering': "['date']", 'object_name': 'Event'}, - 'date': ('django.db.models.fields.DateTimeField', [], {'max_length': '255', 'db_index': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'link': ('django.db.models.fields.URLField', [], {'max_length': '200'}), - 'organizer_en': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '255', 'blank': 'True'}), - 'organizer_pl': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '255', 'blank': 'True'}), - 'place_en': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}), - 'place_pl': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}), - 'published_en': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'published_pl': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'title_en': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}), - 'title_pl': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}) - } - } - - complete_apps = ['events'] \ No newline at end of file diff --git a/events/migrations/0003_auto__add_field_event_date_end.py b/events/migrations/0003_auto__add_field_event_date_end.py deleted file mode 100644 index 805238c..0000000 --- a/events/migrations/0003_auto__add_field_event_date_end.py +++ /dev/null @@ -1,42 +0,0 @@ -# -*- coding: utf-8 -*- -import datetime -from south.db import db -from south.v2 import SchemaMigration -from django.db import models - - -class Migration(SchemaMigration): - - def forwards(self, orm): - # Adding field 'Event.date_end' - db.add_column('events_event', 'date_end', - self.gf('django.db.models.fields.DateTimeField')(db_index=True, default='2000-01-01 0:00', max_length=255, blank=True), - keep_default=False) - - if not db.dry_run: - orm.Event.objects.all().update(date_end=models.F('date')) - - def backwards(self, orm): - # Deleting field 'Event.date_end' - db.delete_column('events_event', 'date_end') - - - models = { - 'events.event': { - 'Meta': {'ordering': "['date']", 'object_name': 'Event'}, - 'date': ('django.db.models.fields.DateTimeField', [], {'max_length': '255', 'db_index': 'True'}), - 'date_end': ('django.db.models.fields.DateTimeField', [], {'db_index': 'True', 'max_length': '255', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'link': ('django.db.models.fields.URLField', [], {'max_length': '200'}), - 'organizer_en': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '255', 'blank': 'True'}), - 'organizer_pl': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '255', 'blank': 'True'}), - 'place_en': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}), - 'place_pl': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}), - 'published_en': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'published_pl': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'title_en': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}), - 'title_pl': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}) - } - } - - complete_apps = ['events'] \ No newline at end of file diff --git a/menu/models.py b/menu/models.py index bebdfaa..bd45524 100644 --- a/menu/models.py +++ b/menu/models.py @@ -1,4 +1,4 @@ import importlib from . import app_settings -items = importlib.import_module(app_settings.MODULE).ITEMS +items = importlib.import_module(app_settings.MODULE).ITEMS() diff --git a/prawokultury/menu_items.py b/prawokultury/menu_items.py index 581455c..2174ca0 100644 --- a/prawokultury/menu_items.py +++ b/prawokultury/menu_items.py @@ -1,11 +1,12 @@ # -*- coding: utf-8 -from migdal.models import Category, Entry from menu.helpers import ObjectMenuItem, MenuItem, ModelMenuItem from django.core.urlresolvers import reverse_lazy from django.utils.translation import ugettext_lazy as _ -ITEMS = [ +def ITEMS(): + from migdal.models import Category, Entry + return [ ObjectMenuItem(obj_get=lambda: Entry.published_objects.get(slug_pl='o-nas')), ModelMenuItem(Entry, reverse_lazy('migdal_entry_list_publications'), field_lookups={'type': 'publications'}, title=_('Publications')), diff --git a/prawokultury/migrations_contrib/__init__.py b/prawokultury/migrations_contrib/__init__.py deleted file mode 100644 index e69de29..0000000 diff --git a/prawokultury/migrations_contrib/getpaid/0001_initial.py b/prawokultury/migrations_contrib/getpaid/0001_initial.py deleted file mode 100644 index 9d655bc..0000000 --- a/prawokultury/migrations_contrib/getpaid/0001_initial.py +++ /dev/null @@ -1,114 +0,0 @@ -# -*- coding: utf-8 -*- -import datetime -from south.db import db -from south.v2 import SchemaMigration -from django.db import models - - -class Migration(SchemaMigration): - - def forwards(self, orm): - # Adding model 'Payment' - db.create_table(u'getpaid_payment', ( - (u'id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), - ('amount', self.gf('django.db.models.fields.DecimalField')(max_digits=20, decimal_places=4)), - ('currency', self.gf('django.db.models.fields.CharField')(max_length=3)), - ('status', self.gf('django.db.models.fields.CharField')(default='new', max_length=20, db_index=True)), - ('backend', self.gf('django.db.models.fields.CharField')(max_length=50)), - ('created_on', self.gf('django.db.models.fields.DateTimeField')(auto_now_add=True, db_index=True, blank=True)), - ('paid_on', self.gf('django.db.models.fields.DateTimeField')(default=None, null=True, db_index=True, blank=True)), - ('amount_paid', self.gf('django.db.models.fields.DecimalField')(default=0, max_digits=20, decimal_places=4)), - ('external_id', self.gf('django.db.models.fields.CharField')(max_length=64, null=True, blank=True)), - ('description', self.gf('django.db.models.fields.CharField')(max_length=128, null=True, blank=True)), - ('order', self.gf('django.db.models.fields.related.ForeignKey')(related_name='payment', to=orm['shop.Order'])), - )) - db.send_create_signal(u'getpaid', ['Payment']) - - - def backwards(self, orm): - # Deleting model 'Payment' - db.delete_table(u'getpaid_payment') - - - models = { - u'getpaid.payment': { - 'Meta': {'ordering': "('-created_on',)", 'object_name': 'Payment'}, - 'amount': ('django.db.models.fields.DecimalField', [], {'max_digits': '20', 'decimal_places': '4'}), - 'amount_paid': ('django.db.models.fields.DecimalField', [], {'default': '0', 'max_digits': '20', 'decimal_places': '4'}), - 'backend': ('django.db.models.fields.CharField', [], {'max_length': '50'}), - 'created_on': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'db_index': 'True', 'blank': 'True'}), - 'currency': ('django.db.models.fields.CharField', [], {'max_length': '3'}), - 'description': ('django.db.models.fields.CharField', [], {'max_length': '128', 'null': 'True', 'blank': 'True'}), - 'external_id': ('django.db.models.fields.CharField', [], {'max_length': '64', 'null': 'True', 'blank': 'True'}), - u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'order': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'payment'", 'to': u"orm['shop.Order']"}), - 'paid_on': ('django.db.models.fields.DateTimeField', [], {'default': 'None', 'null': 'True', 'db_index': 'True', 'blank': 'True'}), - 'status': ('django.db.models.fields.CharField', [], {'default': "'new'", 'max_length': '20', 'db_index': 'True'}) - }, - u'migdal.category': { - 'Meta': {'object_name': 'Category'}, - u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'slug_en': ('django.db.models.fields.SlugField', [], {'unique': 'True', 'max_length': '50'}), - 'slug_pl': ('django.db.models.fields.SlugField', [], {'unique': 'True', 'max_length': '50'}), - 'taxonomy': ('django.db.models.fields.CharField', [], {'max_length': '32'}), - 'title_en': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '64', 'db_index': 'True'}), - 'title_pl': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '64', 'db_index': 'True'}) - }, - u'migdal.entry': { - 'Meta': {'ordering': "['-date']", 'object_name': 'Entry'}, - '_body_en_rendered': ('django.db.models.fields.TextField', [], {}), - '_body_pl_rendered': ('django.db.models.fields.TextField', [], {}), - '_lead_en_rendered': ('django.db.models.fields.TextField', [], {}), - '_lead_pl_rendered': ('django.db.models.fields.TextField', [], {}), - 'author': ('django.db.models.fields.CharField', [], {'max_length': '128'}), - 'author_email': ('django.db.models.fields.EmailField', [], {'max_length': '128', 'null': 'True', 'blank': 'True'}), - 'body_en': ('markupfield.fields.MarkupField', [], {'null': 'True', 'rendered_field': 'True', 'blank': 'True'}), - 'body_en_markup_type': ('django.db.models.fields.CharField', [], {'default': "'textile_pl'", 'max_length': '30', 'blank': 'True'}), - 'body_pl': ('markupfield.fields.MarkupField', [], {'null': 'True', 'rendered_field': 'True', 'blank': 'True'}), - 'body_pl_markup_type': ('django.db.models.fields.CharField', [], {'default': "'textile_pl'", 'max_length': '30', 'blank': 'True'}), - 'canonical_url': ('django.db.models.fields.URLField', [], {'max_length': '200', 'null': 'True', 'blank': 'True'}), - 'categories': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'to': u"orm['migdal.Category']", 'null': 'True', 'blank': 'True'}), - 'changed_at': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'db_index': 'True', 'blank': 'True'}), - 'date': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'db_index': 'True', 'blank': 'True'}), - 'first_published_at': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'blank': 'True'}), - u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'image': ('django.db.models.fields.files.ImageField', [], {'max_length': '100', 'null': 'True', 'blank': 'True'}), - 'in_stream': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'lead_en': ('markupfield.fields.MarkupField', [], {'null': 'True', 'rendered_field': 'True', 'blank': 'True'}), - 'lead_en_markup_type': ('django.db.models.fields.CharField', [], {'default': "'textile_pl'", 'max_length': '30', 'blank': 'True'}), - 'lead_pl': ('markupfield.fields.MarkupField', [], {'null': 'True', 'rendered_field': 'True', 'blank': 'True'}), - 'lead_pl_markup_type': ('django.db.models.fields.CharField', [], {'default': "'textile_pl'", 'max_length': '30', 'blank': 'True'}), - 'needed_en': ('django.db.models.fields.CharField', [], {'default': "'n'", 'max_length': '1', 'db_index': 'True'}), - 'promo': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'published_at_en': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'blank': 'True'}), - 'published_at_pl': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'blank': 'True'}), - 'published_en': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'published_pl': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'slug_en': ('migdal.fields.SlugNullField', [], {'max_length': '50', 'unique': 'True', 'null': 'True', 'blank': 'True'}), - 'slug_pl': ('migdal.fields.SlugNullField', [], {'max_length': '50', 'unique': 'True', 'null': 'True', 'blank': 'True'}), - 'title_en': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}), - 'title_pl': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}), - 'type': ('django.db.models.fields.CharField', [], {'max_length': '16', 'db_index': 'True'}) - }, - u'shop.offer': { - 'Meta': {'ordering': "['entry']", 'object_name': 'Offer'}, - 'cost_const': ('django.db.models.fields.DecimalField', [], {'max_digits': '6', 'decimal_places': '2'}), - 'cost_per_item': ('django.db.models.fields.DecimalField', [], {'default': '0', 'max_digits': '6', 'decimal_places': '2'}), - 'entry': ('django.db.models.fields.related.OneToOneField', [], {'to': u"orm['migdal.Entry']", 'unique': 'True'}), - u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'price': ('django.db.models.fields.DecimalField', [], {'max_digits': '6', 'decimal_places': '2'}) - }, - u'shop.order': { - 'Meta': {'ordering': "['-payed_at']", 'object_name': 'Order'}, - 'address': ('django.db.models.fields.TextField', [], {'db_index': 'True'}), - 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'db_index': 'True'}), - u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'items': ('django.db.models.fields.IntegerField', [], {'default': '1'}), - 'language_code': ('django.db.models.fields.CharField', [], {'max_length': '2', 'null': 'True', 'blank': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '127', 'blank': 'True'}), - 'offer': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['shop.Offer']"}), - 'payed_at': ('django.db.models.fields.DateTimeField', [], {'db_index': 'True', 'null': 'True', 'blank': 'True'}) - } - } - - complete_apps = ['getpaid'] \ No newline at end of file diff --git a/prawokultury/migrations_contrib/getpaid/__init__.py b/prawokultury/migrations_contrib/getpaid/__init__.py deleted file mode 100644 index e69de29..0000000 diff --git a/prawokultury/migrations_contrib/getpaid_payu/0001_initial.py b/prawokultury/migrations_contrib/getpaid_payu/0001_initial.py deleted file mode 100644 index b8b2b79..0000000 --- a/prawokultury/migrations_contrib/getpaid_payu/0001_initial.py +++ /dev/null @@ -1,20 +0,0 @@ -# -*- coding: utf-8 -*- -import datetime -from south.db import db -from south.v2 import SchemaMigration -from django.db import models - - -class Migration(SchemaMigration): - - def forwards(self, orm): - pass - - def backwards(self, orm): - pass - - models = { - - } - - complete_apps = ['payu'] \ No newline at end of file diff --git a/prawokultury/migrations_contrib/getpaid_payu/__init__.py b/prawokultury/migrations_contrib/getpaid_payu/__init__.py deleted file mode 100644 index e69de29..0000000 diff --git a/prawokultury/models.py b/prawokultury/models.py index c759e4d..f488ba1 100644 --- a/prawokultury/models.py +++ b/prawokultury/models.py @@ -1,5 +1,5 @@ from django.conf import settings -from django.contrib.comments.signals import comment_will_be_posted +from django_comments.signals import comment_will_be_posted import re def spamfilter(sender, comment, **kwargs): diff --git a/prawokultury/settings.d/30-apps.py b/prawokultury/settings.d/30-apps.py index a96592b..20ffd63 100644 --- a/prawokultury/settings.d/30-apps.py +++ b/prawokultury/settings.d/30-apps.py @@ -9,8 +9,7 @@ INSTALLED_APPS = ( 'chunks', 'django_gravatar', - 'south', - 'django.contrib.comments', + 'django_comments', 'django_comments_xtd', 'pipeline', 'haystack', diff --git a/prawokultury/settings.d/50-contrib.py b/prawokultury/settings.d/50-contrib.py index 5e34fe8..30b1e5b 100644 --- a/prawokultury/settings.d/50-contrib.py +++ b/prawokultury/settings.d/50-contrib.py @@ -34,9 +34,3 @@ CELERY_EAGER_PROPAGATES_EXCEPTIONS = True CELERY_SEND_TASK_ERROR_EMAILS = True CELERY_TASK_SERIALIZER = 'json' CELERY_ACCEPT_CONTENT = ['json'] - -SOUTH_MIGRATION_MODULES = { - 'getpaid' : 'prawokultury.migrations_contrib.getpaid', - 'payu': 'prawokultury.migrations_contrib.getpaid_payu', - 'taggit': 'taggit.south_migrations', -} diff --git a/prawokultury/static/css/entry.css b/prawokultury/static/css/entry.css index f4490d3..f1d98d1 100644 --- a/prawokultury/static/css/entry.css +++ b/prawokultury/static/css/entry.css @@ -118,3 +118,5 @@ table.borders { table.borders td { border: 1px solid #777; padding: .3em; } + +/*# sourceMappingURL=entry.css.map */ diff --git a/prawokultury/static/css/menu.css b/prawokultury/static/css/menu.css index 9340784..4f07710 100644 --- a/prawokultury/static/css/menu.css +++ b/prawokultury/static/css/menu.css @@ -35,3 +35,5 @@ top: -.25em; } #menu #item-lang a { color: #0050a2; } + +/*# sourceMappingURL=menu.css.map */ diff --git a/prawokultury/urls.py b/prawokultury/urls.py index 848d885..1f83793 100644 --- a/prawokultury/urls.py +++ b/prawokultury/urls.py @@ -43,7 +43,7 @@ urlpatterns += patterns('', url(r'^admin/', include(admin.site.urls)), ) -urlpatterns += i18n_patterns('', +urlpatterns += i18n_patterns( url(string_concat(r'^', _('events'), r'/'), include('events.urls')), url(r'^comments/', include('django_comments_xtd.urls')), url(r'^pierwsza-pomoc/', include('questions.urls')), diff --git a/questions/migrations/0001_initial.py b/questions/migrations/0001_initial.py index 09ce67c..67986d8 100644 --- a/questions/migrations/0001_initial.py +++ b/questions/migrations/0001_initial.py @@ -1,54 +1,95 @@ # -*- coding: utf-8 -*- -import 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.db.models.deletion +import taggit_autosuggest.managers +import markupfield.fields -class Migration(SchemaMigration): - def forwards(self, orm): - # Adding model 'Question' - db.create_table('questions_question', ( - ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), - ('email', self.gf('django.db.models.fields.EmailField')(max_length=75, null=True, blank=True)), - ('question', self.gf('django.db.models.fields.TextField')(db_index=True)), - ('created_at', self.gf('django.db.models.fields.DateTimeField')(auto_now_add=True, blank=True)), - ('approved', self.gf('django.db.models.fields.BooleanField')(default=False)), - ('edited_question', self.gf('django.db.models.fields.TextField')(db_index=True, null=True, blank=True)), - ('answer', self.gf('markupfield.fields.MarkupField')(rendered_field=True, blank=True)), - ('answered', self.gf('django.db.models.fields.BooleanField')(default=False, db_index=True)), - ('answer_markup_type', self.gf('django.db.models.fields.CharField')(default='textile_pl', max_length=30, blank=True)), - ('answered_at', self.gf('django.db.models.fields.DateTimeField')(db_index=True, null=True, blank=True)), - ('_answer_rendered', self.gf('django.db.models.fields.TextField')()), - ('published', self.gf('django.db.models.fields.BooleanField')(default=False, db_index=True)), - ('published_at', self.gf('django.db.models.fields.DateTimeField')(db_index=True, null=True, blank=True)), - )) - db.send_create_signal('questions', ['Question']) +class Migration(migrations.Migration): + dependencies = [ + ('contenttypes', '0001_initial'), + ] - def backwards(self, orm): - # Deleting model 'Question' - db.delete_table('questions_question') - - - models = { - 'questions.question': { - 'Meta': {'ordering': "['-created_at']", 'object_name': 'Question'}, - '_answer_rendered': ('django.db.models.fields.TextField', [], {}), - 'answer': ('markupfield.fields.MarkupField', [], {'rendered_field': 'True', 'blank': 'True'}), - 'answer_markup_type': ('django.db.models.fields.CharField', [], {'default': "'textile_pl'", 'max_length': '30', 'blank': 'True'}), - 'answered': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'db_index': 'True'}), - 'answered_at': ('django.db.models.fields.DateTimeField', [], {'db_index': 'True', 'null': 'True', 'blank': 'True'}), - 'approved': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'created_at': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'edited_question': ('django.db.models.fields.TextField', [], {'db_index': 'True', 'null': 'True', 'blank': 'True'}), - 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'null': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'published': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'db_index': 'True'}), - 'published_at': ('django.db.models.fields.DateTimeField', [], {'db_index': 'True', 'null': 'True', 'blank': 'True'}), - 'question': ('django.db.models.fields.TextField', [], {'db_index': 'True'}) - } - } - - complete_apps = ['questions'] \ No newline at end of file + operations = [ + migrations.CreateModel( + name='Question', + fields=[ + ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), + ('email', models.EmailField(max_length=75, null=True, verbose_name='contact e-mail', blank=True)), + ('question', models.TextField(verbose_name='question')), + ('created_at', models.DateTimeField(auto_now_add=True, verbose_name='created at')), + ('changed_at', models.DateTimeField(auto_now=True, verbose_name='changed at')), + ('approved', models.BooleanField(default=False, verbose_name='approved')), + ('edited_question', models.TextField(help_text="Leave empty if question doesn't need editing.", null=True, verbose_name='edited question', blank=True)), + ('answer', markupfield.fields.MarkupField(help_text='Use Textile syntax.', rendered_field=True, verbose_name='answer', blank=True)), + ('answered_by', models.CharField(max_length=127, null=True, verbose_name='answered by', blank=True)), + ('answer_markup_type', models.CharField(default=b'textile_pl', max_length=30, editable=False, choices=[(b'', b'--'), (b'textile_pl', b'textile_pl')])), + ('answered', models.BooleanField(default=False, help_text='Check to send the answer to user.', db_index=True, verbose_name='answered')), + ('_answer_rendered', models.TextField(editable=False)), + ('answered_at', models.DateTimeField(db_index=True, null=True, verbose_name='answered at', blank=True)), + ('published', models.BooleanField(default=False, help_text='Check to display answered question on site.', db_index=True, verbose_name='published')), + ('published_at', models.DateTimeField(db_index=True, null=True, verbose_name='published at', blank=True)), + ], + options={ + 'ordering': ['-created_at'], + 'verbose_name': 'question', + 'verbose_name_plural': 'questions', + }, + bases=(models.Model,), + ), + migrations.CreateModel( + name='Tag', + fields=[ + ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), + ('name', models.CharField(unique=True, max_length=100, verbose_name='Name')), + ('slug', models.SlugField(unique=True, max_length=100, verbose_name='Slug')), + ('click_count', models.IntegerField(default=0)), + ], + options={ + 'verbose_name': 'Tag', + 'verbose_name_plural': 'Tags', + }, + bases=(models.Model,), + ), + migrations.CreateModel( + name='TagCategory', + fields=[ + ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), + ('name', models.CharField(unique=True, max_length=100, verbose_name='Name')), + ('slug', models.SlugField(unique=True, max_length=100, verbose_name='Slug')), + ], + options={ + 'verbose_name': 'Tag Category', + 'verbose_name_plural': 'Tag Categories', + }, + bases=(models.Model,), + ), + migrations.CreateModel( + name='TagItem', + fields=[ + ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), + ('object_id', models.IntegerField(verbose_name='Object id', db_index=True)), + ('content_type', models.ForeignKey(related_name='questions_tagitem_tagged_items', verbose_name='Content type', to='contenttypes.ContentType')), + ('tag', models.ForeignKey(related_name='items', to='questions.Tag')), + ], + options={ + 'abstract': False, + }, + bases=(models.Model,), + ), + migrations.AddField( + model_name='tag', + name='category', + field=models.ForeignKey(related_name='tags', on_delete=django.db.models.deletion.SET_NULL, blank=True, to='questions.TagCategory', null=True), + preserve_default=True, + ), + migrations.AddField( + model_name='question', + name='tags', + field=taggit_autosuggest.managers.TaggableManager(to='questions.Tag', through='questions.TagItem', blank=True, help_text='A comma-separated list of tags.', verbose_name='Tags'), + preserve_default=True, + ), + ] diff --git a/questions/migrations/0002_auto__add_field_question_changed_at.py b/questions/migrations/0002_auto__add_field_question_changed_at.py deleted file mode 100644 index edb646c..0000000 --- a/questions/migrations/0002_auto__add_field_question_changed_at.py +++ /dev/null @@ -1,42 +0,0 @@ -# -*- coding: utf-8 -*- -import datetime -from south.db import db -from south.v2 import SchemaMigration -from django.db import models - - -class Migration(SchemaMigration): - - def forwards(self, orm): - # Adding field 'Question.changed_at' - db.add_column('questions_question', 'changed_at', - self.gf('django.db.models.fields.DateTimeField')(auto_now=True, default=datetime.datetime.now, blank=True), - keep_default=False) - - - def backwards(self, orm): - # Deleting field 'Question.changed_at' - db.delete_column('questions_question', 'changed_at') - - - models = { - 'questions.question': { - 'Meta': {'ordering': "['-created_at']", 'object_name': 'Question'}, - '_answer_rendered': ('django.db.models.fields.TextField', [], {}), - 'answer': ('markupfield.fields.MarkupField', [], {'rendered_field': 'True', 'blank': 'True'}), - 'answer_markup_type': ('django.db.models.fields.CharField', [], {'default': "'textile_pl'", 'max_length': '30', 'blank': 'True'}), - 'answered': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'db_index': 'True'}), - 'answered_at': ('django.db.models.fields.DateTimeField', [], {'db_index': 'True', 'null': 'True', 'blank': 'True'}), - 'approved': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'changed_at': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}), - 'created_at': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'edited_question': ('django.db.models.fields.TextField', [], {'db_index': 'True', 'null': 'True', 'blank': 'True'}), - 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'null': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'published': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'db_index': 'True'}), - 'published_at': ('django.db.models.fields.DateTimeField', [], {'db_index': 'True', 'null': 'True', 'blank': 'True'}), - 'question': ('django.db.models.fields.TextField', [], {'db_index': 'True'}) - } - } - - complete_apps = ['questions'] \ No newline at end of file diff --git a/questions/migrations/0003_auto__add_tag__add_tagitem.py b/questions/migrations/0003_auto__add_tag__add_tagitem.py deleted file mode 100644 index 7bf22f7..0000000 --- a/questions/migrations/0003_auto__add_tag__add_tagitem.py +++ /dev/null @@ -1,77 +0,0 @@ -# -*- coding: utf-8 -*- -import datetime -from south.db import db -from south.v2 import SchemaMigration -from django.db import models - - -class Migration(SchemaMigration): - - def forwards(self, orm): - # Adding model 'Tag' - db.create_table('questions_tag', ( - ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), - ('name', self.gf('django.db.models.fields.CharField')(max_length=100)), - ('slug', self.gf('django.db.models.fields.SlugField')(unique=True, max_length=100)), - )) - db.send_create_signal('questions', ['Tag']) - - # Adding model 'TagItem' - db.create_table('questions_tagitem', ( - ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), - ('object_id', self.gf('django.db.models.fields.IntegerField')(db_index=True)), - ('content_type', self.gf('django.db.models.fields.related.ForeignKey')(related_name='questions_tagitem_tagged_items', to=orm['contenttypes.ContentType'])), - ('tag', self.gf('django.db.models.fields.related.ForeignKey')(related_name='items', to=orm['questions.Tag'])), - )) - db.send_create_signal('questions', ['TagItem']) - - - def backwards(self, orm): - # Deleting model 'Tag' - db.delete_table('questions_tag') - - # Deleting model 'TagItem' - db.delete_table('questions_tagitem') - - - models = { - 'contenttypes.contenttype': { - 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"}, - 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}) - }, - 'questions.question': { - 'Meta': {'ordering': "['-created_at']", 'object_name': 'Question'}, - '_answer_rendered': ('django.db.models.fields.TextField', [], {}), - 'answer': ('markupfield.fields.MarkupField', [], {'rendered_field': 'True', 'blank': 'True'}), - 'answer_markup_type': ('django.db.models.fields.CharField', [], {'default': "'textile_pl'", 'max_length': '30', 'blank': 'True'}), - 'answered': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'db_index': 'True'}), - 'answered_at': ('django.db.models.fields.DateTimeField', [], {'db_index': 'True', 'null': 'True', 'blank': 'True'}), - 'approved': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'changed_at': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}), - 'created_at': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'edited_question': ('django.db.models.fields.TextField', [], {'db_index': 'True', 'null': 'True', 'blank': 'True'}), - 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'null': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'published': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'db_index': 'True'}), - 'published_at': ('django.db.models.fields.DateTimeField', [], {'db_index': 'True', 'null': 'True', 'blank': 'True'}), - 'question': ('django.db.models.fields.TextField', [], {'db_index': 'True'}) - }, - 'questions.tag': { - 'Meta': {'object_name': 'Tag'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'slug': ('django.db.models.fields.SlugField', [], {'unique': 'True', 'max_length': '100'}) - }, - 'questions.tagitem': { - 'Meta': {'object_name': 'TagItem'}, - 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'questions_tagitem_tagged_items'", 'to': "orm['contenttypes.ContentType']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'object_id': ('django.db.models.fields.IntegerField', [], {'db_index': 'True'}), - 'tag': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'items'", 'to': "orm['questions.Tag']"}) - } - } - - complete_apps = ['questions'] \ No newline at end of file diff --git a/questions/migrations/0004_auto__add_tagcategory__add_field_tag_category__add_unique_tag_name.py b/questions/migrations/0004_auto__add_tagcategory__add_field_tag_category__add_unique_tag_name.py deleted file mode 100644 index ebed00d..0000000 --- a/questions/migrations/0004_auto__add_tagcategory__add_field_tag_category__add_unique_tag_name.py +++ /dev/null @@ -1,86 +0,0 @@ -# -*- coding: utf-8 -*- -import datetime -from south.db import db -from south.v2 import SchemaMigration -from django.db import models - - -class Migration(SchemaMigration): - - def forwards(self, orm): - # Adding model 'TagCategory' - db.create_table('questions_tagcategory', ( - ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), - ('name', self.gf('django.db.models.fields.CharField')(unique=True, max_length=100)), - ('slug', self.gf('django.db.models.fields.SlugField')(unique=True, max_length=100)), - )) - db.send_create_signal('questions', ['TagCategory']) - - # Adding field 'Tag.category' - db.add_column('questions_tag', 'category', - self.gf('django.db.models.fields.related.ForeignKey')(to=orm['questions.TagCategory'], null=True, on_delete=models.SET_NULL, blank=True), - keep_default=False) - - # Adding unique constraint on 'Tag', fields ['name'] - db.create_unique('questions_tag', ['name']) - - - def backwards(self, orm): - # Removing unique constraint on 'Tag', fields ['name'] - db.delete_unique('questions_tag', ['name']) - - # Deleting model 'TagCategory' - db.delete_table('questions_tagcategory') - - # Deleting field 'Tag.category' - db.delete_column('questions_tag', 'category_id') - - - models = { - 'contenttypes.contenttype': { - 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"}, - 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}) - }, - 'questions.question': { - 'Meta': {'ordering': "['-created_at']", 'object_name': 'Question'}, - '_answer_rendered': ('django.db.models.fields.TextField', [], {}), - 'answer': ('markupfield.fields.MarkupField', [], {'rendered_field': 'True', 'blank': 'True'}), - 'answer_markup_type': ('django.db.models.fields.CharField', [], {'default': "'textile_pl'", 'max_length': '30', 'blank': 'True'}), - 'answered': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'db_index': 'True'}), - 'answered_at': ('django.db.models.fields.DateTimeField', [], {'db_index': 'True', 'null': 'True', 'blank': 'True'}), - 'approved': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'changed_at': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}), - 'created_at': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'edited_question': ('django.db.models.fields.TextField', [], {'db_index': 'True', 'null': 'True', 'blank': 'True'}), - 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'null': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'published': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'db_index': 'True'}), - 'published_at': ('django.db.models.fields.DateTimeField', [], {'db_index': 'True', 'null': 'True', 'blank': 'True'}), - 'question': ('django.db.models.fields.TextField', [], {'db_index': 'True'}) - }, - 'questions.tag': { - 'Meta': {'object_name': 'Tag'}, - 'category': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['questions.TagCategory']", 'null': 'True', 'on_delete': 'models.SET_NULL', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '100'}), - 'slug': ('django.db.models.fields.SlugField', [], {'unique': 'True', 'max_length': '100'}) - }, - 'questions.tagcategory': { - 'Meta': {'object_name': 'TagCategory'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '100'}), - 'slug': ('django.db.models.fields.SlugField', [], {'unique': 'True', 'max_length': '100'}) - }, - 'questions.tagitem': { - 'Meta': {'object_name': 'TagItem'}, - 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'questions_tagitem_tagged_items'", 'to': "orm['contenttypes.ContentType']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'object_id': ('django.db.models.fields.IntegerField', [], {'db_index': 'True'}), - 'tag': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'items'", 'to': "orm['questions.Tag']"}) - } - } - - complete_apps = ['questions'] \ No newline at end of file diff --git a/questions/migrations/0005_auto__add_field_tag_click_count.py b/questions/migrations/0005_auto__add_field_tag_click_count.py deleted file mode 100644 index c2e6445..0000000 --- a/questions/migrations/0005_auto__add_field_tag_click_count.py +++ /dev/null @@ -1,70 +0,0 @@ -# -*- coding: utf-8 -*- -import datetime -from south.db import db -from south.v2 import SchemaMigration -from django.db import models - - -class Migration(SchemaMigration): - - def forwards(self, orm): - # Adding field 'Tag.click_count' - db.add_column('questions_tag', 'click_count', - self.gf('django.db.models.fields.IntegerField')(default=0), - keep_default=False) - - - def backwards(self, orm): - # Deleting field 'Tag.click_count' - db.delete_column('questions_tag', 'click_count') - - - models = { - 'contenttypes.contenttype': { - 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"}, - 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}) - }, - 'questions.question': { - 'Meta': {'ordering': "['-created_at']", 'object_name': 'Question'}, - '_answer_rendered': ('django.db.models.fields.TextField', [], {}), - 'answer': ('markupfield.fields.MarkupField', [], {'rendered_field': 'True', 'blank': 'True'}), - 'answer_markup_type': ('django.db.models.fields.CharField', [], {'default': "'textile_pl'", 'max_length': '30', 'blank': 'True'}), - 'answered': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'db_index': 'True'}), - 'answered_at': ('django.db.models.fields.DateTimeField', [], {'db_index': 'True', 'null': 'True', 'blank': 'True'}), - 'approved': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'changed_at': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}), - 'created_at': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'edited_question': ('django.db.models.fields.TextField', [], {'db_index': 'True', 'null': 'True', 'blank': 'True'}), - 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'null': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'published': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'db_index': 'True'}), - 'published_at': ('django.db.models.fields.DateTimeField', [], {'db_index': 'True', 'null': 'True', 'blank': 'True'}), - 'question': ('django.db.models.fields.TextField', [], {'db_index': 'True'}) - }, - 'questions.tag': { - 'Meta': {'object_name': 'Tag'}, - 'category': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['questions.TagCategory']", 'null': 'True', 'on_delete': 'models.SET_NULL', 'blank': 'True'}), - 'click_count': ('django.db.models.fields.IntegerField', [], {'default': '0'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '100'}), - 'slug': ('django.db.models.fields.SlugField', [], {'unique': 'True', 'max_length': '100'}) - }, - 'questions.tagcategory': { - 'Meta': {'object_name': 'TagCategory'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '100'}), - 'slug': ('django.db.models.fields.SlugField', [], {'unique': 'True', 'max_length': '100'}) - }, - 'questions.tagitem': { - 'Meta': {'object_name': 'TagItem'}, - 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'questions_tagitem_tagged_items'", 'to': "orm['contenttypes.ContentType']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'object_id': ('django.db.models.fields.IntegerField', [], {'db_index': 'True'}), - 'tag': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'items'", 'to': "orm['questions.Tag']"}) - } - } - - complete_apps = ['questions'] \ No newline at end of file diff --git a/questions/migrations/0006_auto__del_unique_tag_name__add_field_question_answered_by.py b/questions/migrations/0006_auto__del_unique_tag_name__add_field_question_answered_by.py deleted file mode 100644 index 7f3a452..0000000 --- a/questions/migrations/0006_auto__del_unique_tag_name__add_field_question_answered_by.py +++ /dev/null @@ -1,80 +0,0 @@ -# -*- coding: utf-8 -*- -import datetime -from south.db import db -from south.v2 import SchemaMigration -from django.db import models - - -class Migration(SchemaMigration): - - def forwards(self, orm): - # Removing unique constraint on 'Tag', fields ['name'] - db.delete_unique('questions_tag', ['name']) - - # Adding field 'Question.answered_by' - db.add_column('questions_question', 'answered_by', - self.gf('django.db.models.fields.CharField')(max_length=127, null=True, blank=True), - keep_default=False) - - if not db.dry_run: - orm.Question.objects.filter(answered=True).update(answered_by=u"dr Krzysztof Siewicz") - - - def backwards(self, orm): - # Adding unique constraint on 'Tag', fields ['name'] - db.create_unique('questions_tag', ['name']) - - # Deleting field 'Question.answered_by' - db.delete_column('questions_question', 'answered_by') - - - models = { - 'contenttypes.contenttype': { - 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"}, - 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}) - }, - 'questions.question': { - 'Meta': {'ordering': "['-created_at']", 'object_name': 'Question'}, - '_answer_rendered': ('django.db.models.fields.TextField', [], {}), - 'answer': ('markupfield.fields.MarkupField', [], {'rendered_field': 'True', 'blank': 'True'}), - 'answer_markup_type': ('django.db.models.fields.CharField', [], {'default': "'textile_pl'", 'max_length': '30', 'blank': 'True'}), - 'answered': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'db_index': 'True'}), - 'answered_at': ('django.db.models.fields.DateTimeField', [], {'db_index': 'True', 'null': 'True', 'blank': 'True'}), - 'answered_by': ('django.db.models.fields.CharField', [], {'max_length': '127', 'null': 'True', 'blank': 'True'}), - 'approved': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'changed_at': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}), - 'created_at': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'edited_question': ('django.db.models.fields.TextField', [], {'db_index': 'True', 'null': 'True', 'blank': 'True'}), - 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'null': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'published': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'db_index': 'True'}), - 'published_at': ('django.db.models.fields.DateTimeField', [], {'db_index': 'True', 'null': 'True', 'blank': 'True'}), - 'question': ('django.db.models.fields.TextField', [], {'db_index': 'True'}) - }, - 'questions.tag': { - 'Meta': {'object_name': 'Tag'}, - 'category': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'tags'", 'null': 'True', 'on_delete': 'models.SET_NULL', 'to': "orm['questions.TagCategory']"}), - 'click_count': ('django.db.models.fields.IntegerField', [], {'default': '0'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'slug': ('django.db.models.fields.SlugField', [], {'unique': 'True', 'max_length': '100'}) - }, - 'questions.tagcategory': { - 'Meta': {'object_name': 'TagCategory'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '100'}), - 'slug': ('django.db.models.fields.SlugField', [], {'unique': 'True', 'max_length': '100'}) - }, - 'questions.tagitem': { - 'Meta': {'object_name': 'TagItem'}, - 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'questions_tagitem_tagged_items'", 'to': "orm['contenttypes.ContentType']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'object_id': ('django.db.models.fields.IntegerField', [], {'db_index': 'True'}), - 'tag': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'items'", 'to': "orm['questions.Tag']"}) - } - } - - complete_apps = ['questions'] diff --git a/questions/migrations/0007_auto.py b/questions/migrations/0007_auto.py deleted file mode 100644 index 3d6c165..0000000 --- a/questions/migrations/0007_auto.py +++ /dev/null @@ -1,75 +0,0 @@ -# -*- coding: utf-8 -*- -import datetime -from south.db import db -from south.v2 import SchemaMigration -from django.db import models - - -class Migration(SchemaMigration): - - def forwards(self, orm): - # Removing index on 'Question', fields ['question'] - db.delete_index('questions_question', ['question']) - - # Removing index on 'Question', fields ['edited_question'] - db.delete_index('questions_question', ['edited_question']) - - - def backwards(self, orm): - # Adding index on 'Question', fields ['edited_question'] - db.create_index('questions_question', ['edited_question']) - - # Adding index on 'Question', fields ['question'] - db.create_index('questions_question', ['question']) - - - models = { - 'contenttypes.contenttype': { - 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"}, - 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}) - }, - 'questions.question': { - 'Meta': {'ordering': "['-created_at']", 'object_name': 'Question'}, - '_answer_rendered': ('django.db.models.fields.TextField', [], {}), - 'answer': ('markupfield.fields.MarkupField', [], {'rendered_field': 'True', 'blank': 'True'}), - 'answer_markup_type': ('django.db.models.fields.CharField', [], {'default': "'textile_pl'", 'max_length': '30', 'blank': 'True'}), - 'answered': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'db_index': 'True'}), - 'answered_at': ('django.db.models.fields.DateTimeField', [], {'db_index': 'True', 'null': 'True', 'blank': 'True'}), - 'answered_by': ('django.db.models.fields.CharField', [], {'max_length': '127', 'null': 'True', 'blank': 'True'}), - 'approved': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'changed_at': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}), - 'created_at': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'edited_question': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'null': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'published': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'db_index': 'True'}), - 'published_at': ('django.db.models.fields.DateTimeField', [], {'db_index': 'True', 'null': 'True', 'blank': 'True'}), - 'question': ('django.db.models.fields.TextField', [], {}) - }, - 'questions.tag': { - 'Meta': {'object_name': 'Tag'}, - 'category': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'tags'", 'null': 'True', 'on_delete': 'models.SET_NULL', 'to': "orm['questions.TagCategory']"}), - 'click_count': ('django.db.models.fields.IntegerField', [], {'default': '0'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'slug': ('django.db.models.fields.SlugField', [], {'unique': 'True', 'max_length': '100'}) - }, - 'questions.tagcategory': { - 'Meta': {'object_name': 'TagCategory'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '100'}), - 'slug': ('django.db.models.fields.SlugField', [], {'unique': 'True', 'max_length': '100'}) - }, - 'questions.tagitem': { - 'Meta': {'object_name': 'TagItem'}, - 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'questions_tagitem_tagged_items'", 'to': "orm['contenttypes.ContentType']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'object_id': ('django.db.models.fields.IntegerField', [], {'db_index': 'True'}), - 'tag': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'items'", 'to': "orm['questions.Tag']"}) - } - } - - complete_apps = ['questions'] \ No newline at end of file diff --git a/requirements.txt b/requirements.txt index c838905..53c4cb6 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,27 +1,27 @@ --i https://py.mdrn.pl:8443/simple +-i https://py.mdrn.pl/simple -Django>=1.6,<1.7 +Django>=1.7,<1.8 django_cas>=2.1,<2.2 -South>=0.7.4 -PIL -sorl-thumbnail>=11.09,<12 +Pillow +sorl-thumbnail==12.4.1 django-pagination -django-honeypot +django-honeypot==0.4.0 -django-migdal>=0.5.1,<0.6 -fnpdjango>=0.2.2,<0.3 +django-migdal==0.8.6 +fnpdjango==0.4.1 python-slugify -django-markupfield>=1.2,<1.3 +django-markupfield==1.4.3 django-gravatar2 -django-comments-xtd>=1.2,<1.3 +django-contrib-comments==1.6.0 +django-comments-xtd==1.5.1 django-pipeline>=1.3.23,<1.4 #pyScss #git+git://github.com/Kronuz/pyScss.git@d8f4da23a3c87696a75b3830ed4ab49b75550a93#egg=pyScss #TODO: pyScss support, for now just install sass -django-haystack>=2.1,<2.2 +django-haystack==2.7.0 pysolr django-piwik diff --git a/shop/migrations/0001_initial.py b/shop/migrations/0001_initial.py index 471a911..09a9aa4 100644 --- a/shop/migrations/0001_initial.py +++ b/shop/migrations/0001_initial.py @@ -1,109 +1,49 @@ # -*- coding: utf-8 -*- -import datetime -from south.db import db -from south.v2 import SchemaMigration -from django.db import models - - -class Migration(SchemaMigration): - - def forwards(self, orm): - # Adding model 'Offer' - db.create_table('shop_offer', ( - ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), - ('entry', self.gf('django.db.models.fields.related.OneToOneField')(to=orm['migdal.Entry'], unique=True)), - ('price', self.gf('django.db.models.fields.DecimalField')(max_digits=6, decimal_places=2)), - ('cost_const', self.gf('django.db.models.fields.DecimalField')(max_digits=6, decimal_places=2)), - ('cost_per_item', self.gf('django.db.models.fields.DecimalField')(default=0, max_digits=6, decimal_places=2)), - )) - db.send_create_signal('shop', ['Offer']) - - # Adding model 'Order' - db.create_table('shop_order', ( - ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), - ('offer', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['shop.Offer'])), - ('items', self.gf('django.db.models.fields.IntegerField')(default=1)), - ('name', self.gf('django.db.models.fields.CharField')(max_length=127, blank=True)), - ('email', self.gf('django.db.models.fields.EmailField')(max_length=75, db_index=True)), - ('address', self.gf('django.db.models.fields.TextField')(db_index=True)), - ('payed_at', self.gf('django.db.models.fields.DateTimeField')(db_index=True, null=True, blank=True)), - ('language_code', self.gf('django.db.models.fields.CharField')(max_length=2, null=True, blank=True)), - )) - db.send_create_signal('shop', ['Order']) - - - def backwards(self, orm): - # Deleting model 'Offer' - db.delete_table('shop_offer') - - # Deleting model 'Order' - db.delete_table('shop_order') - - - models = { - 'migdal.category': { - 'Meta': {'object_name': 'Category'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'slug_en': ('django.db.models.fields.SlugField', [], {'unique': 'True', 'max_length': '50'}), - 'slug_pl': ('django.db.models.fields.SlugField', [], {'unique': 'True', 'max_length': '50'}), - 'taxonomy': ('django.db.models.fields.CharField', [], {'max_length': '32'}), - 'title_en': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '64', 'db_index': 'True'}), - 'title_pl': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '64', 'db_index': 'True'}) - }, - 'migdal.entry': { - 'Meta': {'ordering': "['-date']", 'object_name': 'Entry'}, - '_body_en_rendered': ('django.db.models.fields.TextField', [], {}), - '_body_pl_rendered': ('django.db.models.fields.TextField', [], {}), - '_lead_en_rendered': ('django.db.models.fields.TextField', [], {}), - '_lead_pl_rendered': ('django.db.models.fields.TextField', [], {}), - 'author': ('django.db.models.fields.CharField', [], {'max_length': '128'}), - 'author_email': ('django.db.models.fields.EmailField', [], {'max_length': '128', 'null': 'True', 'blank': 'True'}), - 'body_en': ('markupfield.fields.MarkupField', [], {'null': 'True', 'rendered_field': 'True', 'blank': 'True'}), - 'body_en_markup_type': ('django.db.models.fields.CharField', [], {'default': "'textile_pl'", 'max_length': '30', 'blank': 'True'}), - 'body_pl': ('markupfield.fields.MarkupField', [], {'null': 'True', 'rendered_field': 'True', 'blank': 'True'}), - 'body_pl_markup_type': ('django.db.models.fields.CharField', [], {'default': "'textile_pl'", 'max_length': '30', 'blank': 'True'}), - 'categories': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'to': "orm['migdal.Category']", 'null': 'True', 'blank': 'True'}), - 'changed_at': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'db_index': 'True', 'blank': 'True'}), - 'date': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'db_index': 'True', 'blank': 'True'}), - 'first_published_at': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'image': ('django.db.models.fields.files.ImageField', [], {'max_length': '100', 'null': 'True', 'blank': 'True'}), - 'in_stream': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'lead_en': ('markupfield.fields.MarkupField', [], {'null': 'True', 'rendered_field': 'True', 'blank': 'True'}), - 'lead_en_markup_type': ('django.db.models.fields.CharField', [], {'default': "'textile_pl'", 'max_length': '30', 'blank': 'True'}), - 'lead_pl': ('markupfield.fields.MarkupField', [], {'null': 'True', 'rendered_field': 'True', 'blank': 'True'}), - 'lead_pl_markup_type': ('django.db.models.fields.CharField', [], {'default': "'textile_pl'", 'max_length': '30', 'blank': 'True'}), - 'needed_en': ('django.db.models.fields.CharField', [], {'default': "'n'", 'max_length': '1', 'db_index': 'True'}), - 'promo': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'published_at_en': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'blank': 'True'}), - 'published_at_pl': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'blank': 'True'}), - 'published_en': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'published_pl': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'slug_en': ('migdal.fields.SlugNullField', [], {'max_length': '50', 'unique': 'True', 'null': 'True', 'blank': 'True'}), - 'slug_pl': ('migdal.fields.SlugNullField', [], {'max_length': '50', 'unique': 'True', 'null': 'True', 'blank': 'True'}), - 'title_en': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}), - 'title_pl': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}), - 'type': ('django.db.models.fields.CharField', [], {'max_length': '16', 'db_index': 'True'}) - }, - 'shop.offer': { - 'Meta': {'ordering': "['entry']", 'object_name': 'Offer'}, - 'cost_const': ('django.db.models.fields.DecimalField', [], {'max_digits': '6', 'decimal_places': '2'}), - 'cost_per_item': ('django.db.models.fields.DecimalField', [], {'default': '0', 'max_digits': '6', 'decimal_places': '2'}), - 'entry': ('django.db.models.fields.related.OneToOneField', [], {'to': "orm['migdal.Entry']", 'unique': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'price': ('django.db.models.fields.DecimalField', [], {'max_digits': '6', 'decimal_places': '2'}) - }, - 'shop.order': { - 'Meta': {'ordering': "['-payed_at']", 'object_name': 'Order'}, - 'address': ('django.db.models.fields.TextField', [], {'db_index': 'True'}), - 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'db_index': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'items': ('django.db.models.fields.IntegerField', [], {'default': '1'}), - 'language_code': ('django.db.models.fields.CharField', [], {'max_length': '2', 'null': 'True', 'blank': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '127', 'blank': 'True'}), - 'offer': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['shop.Offer']"}), - 'payed_at': ('django.db.models.fields.DateTimeField', [], {'db_index': 'True', 'null': 'True', 'blank': 'True'}) - } - } - - complete_apps = ['shop'] \ No newline at end of file +from __future__ import unicode_literals + +from django.db import models, migrations + + +class Migration(migrations.Migration): + + dependencies = [ + ('migdal', '0001_initial'), + ] + + operations = [ + migrations.CreateModel( + name='Offer', + fields=[ + ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), + ('price', models.DecimalField(verbose_name='price', max_digits=6, decimal_places=2)), + ('cost_const', models.DecimalField(max_digits=6, decimal_places=2)), + ('cost_per_item', models.DecimalField(default=0, max_digits=6, decimal_places=2)), + ('entry', models.OneToOneField(to='migdal.Entry')), + ], + options={ + 'ordering': ['entry'], + 'verbose_name': 'offer', + 'verbose_name_plural': 'offers', + }, + bases=(models.Model,), + ), + migrations.CreateModel( + name='Order', + fields=[ + ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), + ('items', models.IntegerField(default=1, verbose_name='items')), + ('name', models.CharField(max_length=127, verbose_name='name', blank=True)), + ('email', models.EmailField(max_length=75, verbose_name='email', db_index=True)), + ('address', models.TextField(verbose_name='address', db_index=True)), + ('payed_at', models.DateTimeField(db_index=True, null=True, verbose_name='payed at', blank=True)), + ('language_code', models.CharField(max_length=2, null=True, blank=True)), + ('offer', models.ForeignKey(verbose_name='offer', to='shop.Offer')), + ], + options={ + 'ordering': ['-payed_at'], + 'verbose_name': 'order', + 'verbose_name_plural': 'orders', + }, + bases=(models.Model,), + ), + ]