From 0f1d9c82677e949f5333447343ae72f45d4841be Mon Sep 17 00:00:00 2001 From: Radek Czajka Date: Wed, 17 Apr 2013 11:54:00 +0200 Subject: [PATCH] migrations for django-getpaid --- wolnelektury/migrations/__init__.py | 0 .../migrations/getpaid/0001_initial.py | 104 ++++++++++++++++++ wolnelektury/migrations/getpaid/__init__.py | 0 .../migrations/getpaid_payu/0001_initial.py | 20 ++++ .../migrations/getpaid_payu/__init__.py | 0 wolnelektury/settings/contrib.py | 5 + 6 files changed, 129 insertions(+) create mode 100644 wolnelektury/migrations/__init__.py create mode 100644 wolnelektury/migrations/getpaid/0001_initial.py create mode 100644 wolnelektury/migrations/getpaid/__init__.py create mode 100644 wolnelektury/migrations/getpaid_payu/0001_initial.py create mode 100644 wolnelektury/migrations/getpaid_payu/__init__.py diff --git a/wolnelektury/migrations/__init__.py b/wolnelektury/migrations/__init__.py new file mode 100644 index 000000000..e69de29bb diff --git a/wolnelektury/migrations/getpaid/0001_initial.py b/wolnelektury/migrations/getpaid/0001_initial.py new file mode 100644 index 000000000..a4a528004 --- /dev/null +++ b/wolnelektury/migrations/getpaid/0001_initial.py @@ -0,0 +1,104 @@ +# -*- 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)), + ('order', self.gf('django.db.models.fields.related.ForeignKey')(related_name='payment', to=orm['funding.Funding'])), + )) + db.send_create_signal(u'getpaid', ['Payment']) + + + def backwards(self, orm): + # Deleting model 'Payment' + db.delete_table(u'getpaid_payment') + + + models = { + 'catalogue.book': { + 'Meta': {'ordering': "('sort_key',)", 'object_name': 'Book'}, + '_related_info': ('jsonfield.fields.JSONField', [], {'null': 'True', 'blank': 'True'}), + 'changed_at': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'db_index': 'True', 'blank': 'True'}), + 'common_slug': ('django.db.models.fields.SlugField', [], {'max_length': '120'}), + 'cover': ('catalogue.fields.EbookField', [], {'max_length': '100', 'null': 'True', 'format_name': "'cover'", 'blank': 'True'}), + 'created_at': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'db_index': 'True', 'blank': 'True'}), + 'description': ('django.db.models.fields.TextField', [], {'blank': 'True'}), + 'epub_file': ('catalogue.fields.EbookField', [], {'default': "''", 'max_length': '100', 'format_name': "'epub'", 'blank': 'True'}), + 'extra_info': ('jsonfield.fields.JSONField', [], {'default': "'{}'"}), + 'fb2_file': ('catalogue.fields.EbookField', [], {'default': "''", 'max_length': '100', 'format_name': "'fb2'", 'blank': 'True'}), + 'gazeta_link': ('django.db.models.fields.CharField', [], {'max_length': '240', 'blank': 'True'}), + 'html_file': ('catalogue.fields.EbookField', [], {'default': "''", 'max_length': '100', 'format_name': "'html'", 'blank': 'True'}), + u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'language': ('django.db.models.fields.CharField', [], {'default': "'pol'", 'max_length': '3', 'db_index': 'True'}), + 'mobi_file': ('catalogue.fields.EbookField', [], {'default': "''", 'max_length': '100', 'format_name': "'mobi'", 'blank': 'True'}), + 'parent': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'children'", 'null': 'True', 'to': "orm['catalogue.Book']"}), + 'parent_number': ('django.db.models.fields.IntegerField', [], {'default': '0'}), + 'pdf_file': ('catalogue.fields.EbookField', [], {'default': "''", 'max_length': '100', 'format_name': "'pdf'", 'blank': 'True'}), + 'slug': ('django.db.models.fields.SlugField', [], {'unique': 'True', 'max_length': '120'}), + 'sort_key': ('django.db.models.fields.CharField', [], {'max_length': '120', 'db_index': 'True'}), + 'title': ('django.db.models.fields.CharField', [], {'max_length': '120'}), + 'txt_file': ('catalogue.fields.EbookField', [], {'default': "''", 'max_length': '100', 'format_name': "'txt'", 'blank': 'True'}), + 'wiki_link': ('django.db.models.fields.CharField', [], {'max_length': '240', 'blank': 'True'}), + 'xml_file': ('catalogue.fields.EbookField', [], {'default': "''", 'max_length': '100', 'format_name': "'xml'", 'blank': 'True'}) + }, + u'funding.funding': { + 'Meta': {'ordering': "['-payed_at']", 'object_name': 'Funding'}, + 'amount': ('django.db.models.fields.DecimalField', [], {'max_digits': '10', 'decimal_places': '2'}), + 'anonymous': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), + 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}), + u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'name': ('django.db.models.fields.CharField', [], {'max_length': '127', 'blank': 'True'}), + 'offer': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['funding.Offer']"}), + 'payed_at': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'blank': 'True'}), + 'perks': ('django.db.models.fields.related.ManyToManyField', [], {'to': u"orm['funding.Perk']", 'symmetrical': 'False', 'blank': 'True'}) + }, + u'funding.offer': { + 'Meta': {'ordering': "['-end']", 'object_name': 'Offer'}, + 'author': ('django.db.models.fields.CharField', [], {'max_length': '255'}), + 'book': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['catalogue.Book']", 'null': 'True', 'blank': 'True'}), + 'due': ('django.db.models.fields.DateField', [], {}), + 'end': ('django.db.models.fields.DateField', [], {}), + u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'redakcja_url': ('django.db.models.fields.URLField', [], {'max_length': '200', 'blank': 'True'}), + 'slug': ('django.db.models.fields.SlugField', [], {'max_length': '50'}), + 'start': ('django.db.models.fields.DateField', [], {}), + 'target': ('django.db.models.fields.DecimalField', [], {'max_digits': '10', 'decimal_places': '2'}), + 'title': ('django.db.models.fields.CharField', [], {'max_length': '255'}) + }, + u'funding.perk': { + 'Meta': {'ordering': "['-price']", 'object_name': 'Perk'}, + 'description': ('django.db.models.fields.TextField', [], {'blank': 'True'}), + u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'name': ('django.db.models.fields.CharField', [], {'max_length': '255'}), + 'offer': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['funding.Offer']", 'null': 'True', 'blank': 'True'}), + 'price': ('django.db.models.fields.DecimalField', [], {'max_digits': '10', 'decimal_places': '2'}) + }, + 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'}), + u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'order': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'payment'", 'to': u"orm['funding.Funding']"}), + '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'}) + } + } + + complete_apps = ['getpaid'] \ No newline at end of file diff --git a/wolnelektury/migrations/getpaid/__init__.py b/wolnelektury/migrations/getpaid/__init__.py new file mode 100644 index 000000000..e69de29bb diff --git a/wolnelektury/migrations/getpaid_payu/0001_initial.py b/wolnelektury/migrations/getpaid_payu/0001_initial.py new file mode 100644 index 000000000..b8b2b7980 --- /dev/null +++ b/wolnelektury/migrations/getpaid_payu/0001_initial.py @@ -0,0 +1,20 @@ +# -*- 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/wolnelektury/migrations/getpaid_payu/__init__.py b/wolnelektury/migrations/getpaid_payu/__init__.py new file mode 100644 index 000000000..e69de29bb diff --git a/wolnelektury/settings/contrib.py b/wolnelektury/settings/contrib.py index 654066a96..6e3e535d5 100644 --- a/wolnelektury/settings/contrib.py +++ b/wolnelektury/settings/contrib.py @@ -2,3 +2,8 @@ HONEYPOT_FIELD_NAME = 'miut' PAGINATION_INVALID_PAGE_RAISES_404 = True THUMBNAIL_QUALITY = 95 TRANSLATION_REGISTRY = "wolnelektury.translation" + +SOUTH_MIGRATION_MODULES = { + 'getpaid' : 'wolnelektury.migrations.getpaid', + 'payu': 'wolnelektury.migrations.getpaid_payu', +} -- 2.20.1