Answer the question
In order to leave comments, you need to log in
Delete data from 3 table Many to many django?
class Category(models.Model):
title = models.CharField(max_length=200)
url = models.CharField(max_length=200,blank=True, null=True)
parent = models.ForeignKey('Category',blank=True, null=True)
description=models.CharField(max_length=200,blank=True, null=True)
path=models.CharField(max_length=200,blank=True, null=True)
metatitle=models.TextField(max_length=200,blank=True, null=True)
metakey=models.TextField(max_length=200,blank=True, null=True)
metadesc=models.TextField(max_length=200,blank=True, null=True)
published=models.BooleanField(default=True)
position=models.IntegerField(default=0)
class Article(models.Model):
title=models.CharField(max_length=200)
url = models.CharField(max_length=200,blank=True, null=True)
description=RichTextUploadingField()
fulltext=RichTextUploadingField(default='',blank=True, null=True)
created=models.DateTimeField()
image=models.ImageField(upload_to="media/",default='',blank=True, null=True)
category=models.ManyToManyField(Category)
position=models.IntegerField(default=0)
hits=models.IntegerField(default=0)
audio=models.BooleanField(default=False)
audio_url=models.URLField(default='',blank=True, null=True)
audio_file=models.FileField(upload_to='files/',default='',blank=True, null=True)
video=models.BooleanField(default=False)
video_code=models.CharField(default='',max_length=200,blank=True, null=True)
video_url=models.URLField(default='',blank=True, null=True)
user_id=models.IntegerField(default=0)
metatitle=models.TextField(max_length=200,blank=True, null=True)
metakey=models.TextField(max_length=200,blank=True, null=True)
metadesc=models.TextField(max_length=200,blank=True, null=True)
published=models.BooleanField(default=True)
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question