Skip to content

Instantly share code, notes, and snippets.

Created July 2, 2022 19:28
What would you like to do?
from django.db import models
class Post(models.Model):
title = models.CharField(max_length=250)
photo = models.FileField()
caption = models.TextField()
class Meta:
verbose_name = "Post"
verbose_name_plural = "Posts"
def __str__(self) -> str:
return self.title
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment