Created
July 2, 2022 19:28
-
-
Save Bijitakc/ba5ace1af98ad40bbad7cff355d314ee to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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