Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Django Many to Many Fields #10

Open
josephalph opened this issue Mar 21, 2022 · 0 comments
Open

Django Many to Many Fields #10

josephalph opened this issue Mar 21, 2022 · 0 comments

Comments

@josephalph
Copy link

josephalph commented Mar 21, 2022

Hi Unable to display the m2m field in the grid filter it is showing the django id instead

in seralizer im using like below code

current_responsible = serializers.SlugRelatedField(many=True,read_only=True,slug_field='username')

in db models.py

current_responsible = models.ManyToManyField(User,verbose_name= "Current Responsible")

in html

{ dataField: "current_responsible",selector:"current_responsible__username", caption: "Responsible", dataType: "string", alignment: "left",allowFiltering:false,allowHeaderFiltering:true},

Note: filtering is not working for m2m fields

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant