Created
September 21, 2018 14:56
-
-
Save brechin/7a1d27c2cb18b001262f720110adafa0 to your computer and use it in GitHub Desktop.
This file contains 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
# -*- coding: utf-8 -*- | |
from __future__ import unicode_literals | |
from django.http import JsonResponse | |
from .filters import MyFilter | |
def model_list(request): | |
filter = MyFilter(request.GET) | |
return JsonResponse([m for m in filter.qs.values('id', 'base', 'count', 'doubled')], safe=False) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment