Skip to content

Instantly share code, notes, and snippets.

@Bijitakc
Created July 2, 2022 19:28
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save Bijitakc/ba5ace1af98ad40bbad7cff355d314ee to your computer and use it in GitHub Desktop.
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