About Enumeration-type Choices
Use models.TextChoices
to create enumeration-type choices for your model fields:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 |
|
Then you can check the publishing status in the template as follows:
1 2 3 4 |
|
Also by me
Django Paddle Subscriptions app
For Django-based SaaS projects.
Django App for You
Django GDPR Cookie Consent app
For Django websites that use cookies.
Django App for You