Top "Manytomanyfield" questions

Manytomanyfield is a field of a model class in Django that defines many-to-many relationship

How to add multiple objects to ManyToMany relationship at once in Django ?

Based on the Django doc, I should be able to pass multiple objects at once to be added to a …

django list manytomanyfield
Django Admin ManyToManyField

I've made a model (models.py): class opetest(models.Model): name = models.CharField(max_length=200) author = models.ForeignKey(User, related_…

django django-models django-admin manytomanyfield django-orm
'QuerySet' object has no attribute ERROR, trying to get related data on ManyToMany fields

i have the following models: class Tag(models.Model): tag_name = models.CharField(max_length=250) tagcat = models.ForeignKey('TagCat') class …

django django-models manytomanyfield
Django migration error :you cannot alter to or from M2M fields, or add or remove through= on M2M fields

I'm trying to modify a M2M field to a ForeignKey field. The command validate shows me no issues and …

django foreign-keys migration manytomanyfield
Show a ManyToManyField as Checkboxes in Django Admin

Is there a simple way to show a ManyToManyField as Checkboxes in Django Admin? Thanks in advance!

python django django-models django-admin manytomanyfield
How do I remove multiple objects in a ManyToMany relationship based on a filter?

Given these two Models: class Item(models.Model): timestamp = models.DateTimeField() class Source(models.Model): items = models.ManyToManyField(Item, related_…

django manytomanyfield
In django, how do I use a select2 widget for a manytomanyfield?

I want to use a select2 widget for a manytomanyfield in django. There are several django/select2 modules, but the …

django manytomanyfield
Django throws 'Direct assignment to the forward side of a many-to-many set is prohibited.' error

I have two models in Django Users and Contexts.I have defined the models as below class User(models.Model): …

django python-3.x manytomanyfield
django display content of a manytomanyfield

I started using django framework just a few days ago and i desperately need some help with my application. It …

django manytomanyfield
Django Admin: Many-to-Many listbox doesn't show up with a through parameter

I have the following models: class Message(models.Model): date = models.DateTimeField() user = models.ForeignKey(User) thread = models.ForeignKey('self', …

django-admin many-to-many manytomanyfield