From 52e35504271e8ef5108b549eca3f612ea56cee57 Mon Sep 17 00:00:00 2001 From: Gergely Polonkai Date: Mon, 22 Dec 2014 14:24:10 +0100 Subject: [PATCH] Add Competence model --- booking/models.py | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/booking/models.py b/booking/models.py index 5618c8a..a9de518 100644 --- a/booking/models.py +++ b/booking/models.py @@ -1,4 +1,5 @@ from django.db import models +from django.contrib.auth.models import User class Species(models.Model): """Model to hold the Ducks’ species""" @@ -15,3 +16,13 @@ class Location(models.Model): def __str__(self): return self.name + +class Competence(models.Model): + """Model to hold Duck competences""" + + name = models.CharField(max_length = 255, unique = True) + added_at = models.DateTimeField(default = timezone.now) + added_by = models.ForeignKey(User) + + def __str__(self): + return self.name