FAQ Database Discussion Community


Use multiwidget for many to many field with readonly additional data

django,django-admin,many-to-many,django-multiwidget
I've the following models: class Exam(models.Model): participants = models.ManyToMany(settings.AUTH_USER_MODEL, through='Participation') class Participation(models.Model) user = models.OneToOneField(settings.AUTH_USER_MODEL) exam = models.ForeignKey('Exam') specific_number = models.PositiveIntegerField(editable=False) As you can see, the data I'm storing in intermediary model is readonly. It's generated automatically by the system when an instance is created. So I'd like to be...