from django.db import models
from django.contrib.auth.models import User
import datetime
# Create your models here.

class Post(models.Model):
    user=models.ForeignKey(User,on_delete='None')
    title=models.CharField(max_length=50)
    content=models.TextField(default=' ')
    image=models.ImageField(upload_to='media/post_img/')
    created=models.DateTimeField(default=datetime.datetime.now())
    active=models.BooleanField(default=True)
    def __str__(self):
        return self.title

05be5c0ce92cbbbbca80d5ec911dc9c5b608fb05
<mask token>


class Post(models.Model):
    <mask token>
    <mask token>
    <mask token>
    <mask token>
    <mask token>
    <mask token>
    <mask token>

<mask token>


class Post(models.Model):
    <mask token>
    <mask token>
    <mask token>
    <mask token>
    <mask token>
    <mask token>

    def __str__(self):
        return self.title

<mask token>


class Post(models.Model):
    user = models.ForeignKey(User, on_delete='None')
    title = models.CharField(max_length=50)
    content = models.TextField(default=' ')
    image = models.ImageField(upload_to='media/post_img/')
    created = models.DateTimeField(default=datetime.datetime.now())
    active = models.BooleanField(default=True)

    def __str__(self):
        return self.title

from django.db import models
from django.contrib.auth.models import User
import datetime


class Post(models.Model):
    user = models.ForeignKey(User, on_delete='None')
    title = models.CharField(max_length=50)
    content = models.TextField(default=' ')
    image = models.ImageField(upload_to='media/post_img/')
    created = models.DateTimeField(default=datetime.datetime.now())
    active = models.BooleanField(default=True)

    def __str__(self):
        return self.title

from django.db import models
from django.contrib.auth.models import User
import datetime
# Create your models here.

class Post(models.Model):
    user=models.ForeignKey(User,on_delete='None')
    title=models.CharField(max_length=50)
    content=models.TextField(default=' ')
    image=models.ImageField(upload_to='media/post_img/')
    created=models.DateTimeField(default=datetime.datetime.now())
    active=models.BooleanField(default=True)
    def __str__(self):
        return self.title
