Add Competence model
This commit is contained in:
parent
cd1d99af38
commit
52e3550427
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user