from django.db import models
from django.contrib import admin


# Create your models here.

class Category(models.Model):
    title = models.CharField(max_length=100, db_index=True)
    slug = models.SlugField(max_length=100, db_index=True)


class Blog(models.Model):
    title = models.CharField(max_length=100, unique=True)
    slug = models.SlugField(max_length=100, unique=True)
    body = models.TextField()
    posted = models.DateField(db_index=True, auto_now_add=True)
    category = models.ForeignKey(Category, on_delete=models.CASCADE)
    enable = models.BooleanField(default=True)


class BlagAdmin(admin.ModelAdmin):
    list_display = ('title', 'enable')


class Comments(models.Model):
    title = models.TextField()
    blog = models.ForeignKey(Blog, on_delete=models.CASCADE)

c6b13d682a80d9fd2f1d0dd50321254e8742915e
<mask token>


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


class BlagAdmin(admin.ModelAdmin):
    list_display = 'title', 'enable'


class Comments(models.Model):
    title = models.TextField()
    blog = models.ForeignKey(Blog, on_delete=models.CASCADE)

<mask token>


class Blog(models.Model):
    title = models.CharField(max_length=100, unique=True)
    slug = models.SlugField(max_length=100, unique=True)
    body = models.TextField()
    posted = models.DateField(db_index=True, auto_now_add=True)
    category = models.ForeignKey(Category, on_delete=models.CASCADE)
    enable = models.BooleanField(default=True)


class BlagAdmin(admin.ModelAdmin):
    list_display = 'title', 'enable'


class Comments(models.Model):
    title = models.TextField()
    blog = models.ForeignKey(Blog, on_delete=models.CASCADE)

<mask token>


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


class Blog(models.Model):
    title = models.CharField(max_length=100, unique=True)
    slug = models.SlugField(max_length=100, unique=True)
    body = models.TextField()
    posted = models.DateField(db_index=True, auto_now_add=True)
    category = models.ForeignKey(Category, on_delete=models.CASCADE)
    enable = models.BooleanField(default=True)


class BlagAdmin(admin.ModelAdmin):
    list_display = 'title', 'enable'


class Comments(models.Model):
    title = models.TextField()
    blog = models.ForeignKey(Blog, on_delete=models.CASCADE)

from django.db import models
from django.contrib import admin


class Category(models.Model):
    title = models.CharField(max_length=100, db_index=True)
    slug = models.SlugField(max_length=100, db_index=True)


class Blog(models.Model):
    title = models.CharField(max_length=100, unique=True)
    slug = models.SlugField(max_length=100, unique=True)
    body = models.TextField()
    posted = models.DateField(db_index=True, auto_now_add=True)
    category = models.ForeignKey(Category, on_delete=models.CASCADE)
    enable = models.BooleanField(default=True)


class BlagAdmin(admin.ModelAdmin):
    list_display = 'title', 'enable'


class Comments(models.Model):
    title = models.TextField()
    blog = models.ForeignKey(Blog, on_delete=models.CASCADE)

from django.db import models
from django.contrib import admin


# Create your models here.

class Category(models.Model):
    title = models.CharField(max_length=100, db_index=True)
    slug = models.SlugField(max_length=100, db_index=True)


class Blog(models.Model):
    title = models.CharField(max_length=100, unique=True)
    slug = models.SlugField(max_length=100, unique=True)
    body = models.TextField()
    posted = models.DateField(db_index=True, auto_now_add=True)
    category = models.ForeignKey(Category, on_delete=models.CASCADE)
    enable = models.BooleanField(default=True)


class BlagAdmin(admin.ModelAdmin):
    list_display = ('title', 'enable')


class Comments(models.Model):
    title = models.TextField()
    blog = models.ForeignKey(Blog, on_delete=models.CASCADE)
