Created
November 25, 2015 15:58
-
-
Save BastinRobin/5ab7df04a995e9c9c291 to your computer and use it in GitHub Desktop.
Django Dynamic URL parameter Query
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| model = Model.objects | |
| for k,vals in request.GET.lists(): | |
| for v in vals: | |
| result = model.filter(**{"%s__in" % k: vals}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment