diff options
author | Roger Gonzalez <roger@rogs.me> | 2021-01-10 14:34:56 -0300 |
---|---|---|
committer | Roger Gonzalez <roger@rogs.me> | 2021-01-10 14:34:56 -0300 |
commit | 36e77f145d64ccaf6904d0664029f7bec997cbaa (patch) | |
tree | e712f02fb36fb9c7cde1d6db624ebda51d4a3959 /app/example/models.py |
Diffstat (limited to 'app/example/models.py')
-rw-r--r-- | app/example/models.py | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/app/example/models.py b/app/example/models.py new file mode 100644 index 0000000..0632304 --- /dev/null +++ b/app/example/models.py @@ -0,0 +1,13 @@ +from django.db import models + + +class Person(models.Model): + """This is a demo person model""" + + first_name = models.CharField(max_length=50) + last_name = models.CharField(max_length=50) + date_of_birth = models.DateField() + picture = models.ImageField() + + def __str__(self): + return f"{self.first_name} {self.last_name} {str(self.date_of_birth)}" |