37👍
✅
I believe what you want is a filter_horizontal
widget used in the Admin template. This should help: Django Admin ManyToManyField
1👍
currently i am able to display many to many fields is admin panel
models.py
class Abc(models.Model):
course = models.ManyToManyField(Course, blank=True)
admin.py
class AbcsAdmin(admin.ModelAdmin):
"""
Admin panel management for Alumni
"""
list_display = ["id","get_course"]
def get_course(self,obj):
return [course.name for course in obj.course.all()]
- [Django]-Django gunicorn sock file not created by wsgi
- [Django]-Default value for user ForeignKey with Django admin
- [Django]-Remove Labels in a Django Crispy Forms
Source:stackexchange.com