From: Matthijs Kooijman Date: Tue, 19 Oct 2010 09:46:01 +0000 (+0200) Subject: tickets: Add Booking.payment field. X-Git-Url: https://git.stderr.nl/gitweb?a=commitdiff_plain;h=e2c6c997620f91043c262d0bad0ed95306d69ceb;p=matthijs%2Fprojects%2Fdorestad-bookings.git tickets: Add Booking.payment field. --- diff --git a/tickets/migrations/0002_auto__add_field_booking_payment.py b/tickets/migrations/0002_auto__add_field_booking_payment.py new file mode 100644 index 0000000..fd24f86 --- /dev/null +++ b/tickets/migrations/0002_auto__add_field_booking_payment.py @@ -0,0 +1,36 @@ +# encoding: utf-8 +import datetime +from south.db import db +from south.v2 import SchemaMigration +from django.db import models + +class Migration(SchemaMigration): + + def forwards(self, orm): + + # Adding field 'Booking.payment' + db.add_column('tickets_booking', 'payment', self.gf('django.db.models.fields.DateTimeField')(null=True, blank=True), keep_default=False) + + + def backwards(self, orm): + + # Deleting field 'Booking.payment' + db.delete_column('tickets_booking', 'payment') + + + models = { + 'tickets.booking': { + 'Meta': {'object_name': 'Booking'}, + 'address1': ('django.db.models.fields.CharField', [], {'max_length': '50'}), + 'address2': ('django.db.models.fields.CharField', [], {'max_length': '50'}), + 'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), + 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75'}), + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}), + 'payment': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'blank': 'True'}), + 'show': ('django.db.models.fields.CharField', [], {'max_length': '50'}), + 'tickets': ('django.db.models.fields.IntegerField', [], {}) + } + } + + complete_apps = ['tickets'] diff --git a/tickets/models.py b/tickets/models.py index 3d174dd..f022e6f 100644 --- a/tickets/models.py +++ b/tickets/models.py @@ -17,3 +17,4 @@ class Booking(models.Model): email = models.EmailField(verbose_name="Email adres") tickets = models.IntegerField(choices=TICKETS_CHOICES, verbose_name="Aantal kaarten") show = models.CharField(max_length=50, choices=SHOW_CHOICES, verbose_name="Voorstelling") + payment = models.DateTimeField(blank=True, null=True, verbose_name="Betaling vewerkt op")