Organizational Research By

Surprising Reserch Topic

django queryset limited choice filed by fk using -'django-filter'

django queryset limited choice filed by fk  using -'django-filter'

I have two models


To display data using the django-filter.
Unfortunately, when you create a form in the select-field all the values of the model Asset, and I would just those related to FK model Notification.

 def get_queryset(self):
        self.filter = NotificationListFilter(
            queryset = Notification.objects.all()

        return self.filter
    except :
        return Notification.objects.order_by('-asset__system')

In some way I can build queryset this to happen?

asked Sep 7, 2015 by rajesh
0 votes

Related Hot Questions

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.
Anti-spam verification:
To avoid this verification in future, please log in or register.