From: Matthijs Kooijman Date: Mon, 18 Oct 2010 11:34:48 +0000 (+0200) Subject: tickets: Add Booking model. X-Git-Url: https://git.stderr.nl/gitweb?a=commitdiff_plain;h=73d9c7d53dca584883af5c83c7ee2f7d4f1ad81a;p=matthijs%2Fprojects%2Fdorestad-bookings.git tickets: Add Booking model. --- diff --git a/tickets/models.py b/tickets/models.py index 71a8362..2a7c3f7 100644 --- a/tickets/models.py +++ b/tickets/models.py @@ -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")