How to use filtering data while using distinct method in django?

前端 未结 3 1934
后悔当初
后悔当初 2020-12-22 10:05

please help me on my problem I hope my title is enough to understand what I mean, please help me on this problem guys.

When I tried this:

id_list = g         


        
3条回答
  •  轮回少年
    2020-12-22 10:06

    I haven't worked with Django much for a couple of years, but this is what I think is happening.

    You're assigning a values_list (a tuple) to piste. You're not assigning grade objects to piste. However, in your template you're expecting the elements of piste to be grades.

    I believe you need to get the grade object first and send that to the template as well as the piste.

提交回复
热议问题