From 73d9c7d53dca584883af5c83c7ee2f7d4f1ad81a Mon Sep 17 00:00:00 2001 From: Matthijs Kooijman Date: Mon, 18 Oct 2010 13:34:48 +0200 Subject: [PATCH] tickets: Add Booking model. --- tickets/models.py | 15 +++++++++++++++ 1 file changed, 15 insertions(+) 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") -- 2.30.2