python (65.2k questions)
javascript (44.3k questions)
reactjs (22.7k questions)
java (20.8k questions)
c# (17.4k questions)
html (16.3k questions)
r (13.7k questions)
android (13k questions)
ManytoManyField Django : how to call models in methods?
I need help for something, I want to call models with ManyToManyField.
I want to have method to get Class A from Class B, and another in Class B to get Class A.
here's my (shortened) code :
class Lice...
MythMega
Votes: 0
Answers: 1
AttributeError: Class1 object has no attribute 'class2_set' with ManyToMany Field Django
Model :
class Groupe(models.Model):
name = models.CharField(max_length=255)
autoAddingMail = models.CharField(max_length=255,null=True,blank=True)
association = models.ForeignKey(
...
enzo.masson
Votes: 0
Answers: 1
Django ManyToManyField Model Manager
In my Python Django 3.7 source code I have the following models:
class ExampleForeignKey(models.Model):
name = models.Charfield(max_length=200)
fields = models.ManyToManyField('ExampleField', ...
Huw
Votes: 0
Answers: 0
Django: ModelMultipleChoiceField not working when Form's model is not the one where a ManyToMany field is defined but "the other class"
I am trying to create an event staff management tool in Django. One part of the data model is that a staff member (class Staff) is linked to a scheduled shift (ScheduledEventShift) via ManyToManyField...
hitby frozenfire
Votes: 0
Answers: 1