tickets: Add Booking model.
authorMatthijs Kooijman <matthijs@stdin.nl>
Mon, 18 Oct 2010 11:34:48 +0000 (13:34 +0200)
committerMatthijs Kooijman <matthijs@stdin.nl>
Mon, 18 Oct 2010 11:34:48 +0000 (13:34 +0200)
tickets/models.py

index 71a836239075aa6e6e4ecb700e9c42c95c022d91..2a7c3f783a39abd62a16ac23cf8c5f98e36ee67f 100644 (file)
@@ -1,3 +1,18 @@
 from django.db import models
 
 # Create your models here.
+
+SHOW_CHOICES = [ ("vrijdag", "vrijdag 17 december, 20:00")
+               , ("zaterdag", "zaterdag 18 december, 20:00")
+               , ("zondag", "zondag 19 december, 13:00")
+               ]
+
+TICKETS_CHOICES = [ (n, n) for n in range(1, 6)]
+
+class Booking(models.Model):
+    name = models.CharField(max_length=100, verbose_name="Naam")
+    address1 = models.CharField(max_length=50, verbose_name="Adres")
+    address2 = models.CharField(max_length=50, verbose_name="")
+    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")