duck-booking-tool/booking/models.py

18 lines
400 B
Python
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

from django.db import models
class Species(models.Model):
"""Model to hold the Ducks species"""
name = models.CharField(max_length = 40, unique = True)
def __str__(self):
return self.name
class Location(models.Model):
"""Model to hold the possible locations of the Ducks"""
name = models.CharField(max_length = 50)
def __str__(self):
return self.name