3👍
✅
Assuming you mean you want to avoid getting back the same record more than once, you can just add .distinct()
to your queryset before evaluating it
0👍
For the record – .distinct() has some caveeats described in its documentation: http://docs.djangoproject.com/en/dev/ref/models/querysets/#distinct
- [Django]-Get method classname inside decorator at __init__ in python
- [Django]-Dynamically reload the URLConfs for a running site
- [Django]-Django S3 uploaded file urls show credentials
Source:stackexchange.com