You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
13 lines
408 B
Python
13 lines
408 B
Python
from django.db import models
|
|
|
|
|
|
class Creature(models.Model):
|
|
image = models.ImageField(upload_to="creatures")
|
|
caption = models.CharField(max_length=255)
|
|
created = models.DateTimeField("date created", auto_now_add=True)
|
|
updated = models.DateTimeField("date updated", auto_now=True)
|
|
published = models.BooleanField(null=False, default=True)
|
|
|
|
class Meta:
|
|
ordering = ["-created"]
|