Add Competence model

This commit is contained in:
Gergely Polonkai 2014-12-22 14:24:10 +01:00 committed by Gergely Polonkai
parent cd1d99af38
commit 52e3550427

View File

@ -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