Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 9 lines (7 sloc) 0.35 kB
e428a00 @evildmp committing all files (I hope)
authored
1 from django.http import HttpResponse
2 from django.core import serializers
3 from models import SubCategory
4
5 def subcategory(request, category_id):
8fa1af8 @ojii My stab at making the code style more consistent, and more PEP8 compl…
ojii authored
6 queryset = SubCategory.objects.filter(category=category_id)
7 content = serializers.serialize('json', queryset, fields=('pk','name'))
8 return HttpResponse(content, content_type='application/json')
Something went wrong with that request. Please try again.