nuitdelinfo_2021/people/models.py

25 lines
811 B
Python
Raw Normal View History

2021-12-02 23:46:42 +01:00
from django.db.models import Model, CharField, DateField, BooleanField, ForeignKey, CASCADE
from django_quill.fields import QuillField
2021-12-02 21:57:32 +01:00
class People(Model):
2021-12-02 23:46:42 +01:00
first_name = CharField(max_length=40)
last_name = CharField(max_length=60)
2021-12-02 21:57:32 +01:00
2021-12-02 23:46:42 +01:00
title = CharField(max_length=70, null=True, blank=True)
description = QuillField()
2021-12-02 21:57:32 +01:00
2021-12-02 23:46:42 +01:00
birth = DateField()
death = DateField(null=True, blank=True)
2021-12-02 21:57:32 +01:00
2021-12-02 23:46:42 +01:00
history = QuillField(null=True, blank=True)
genealogy = QuillField(null=True, blank=True)
awards = QuillField(null=True, blank=True)
pro_life = QuillField(null=True, blank=True)
2021-12-02 21:57:32 +01:00
2021-12-02 23:46:42 +01:00
testimonials = QuillField(null=True, blank=True)
sources = QuillField()
validated = BooleanField(default=False)
pending_edit_of = ForeignKey("self", on_delete=CASCADE, null=True, blank=True)