@method_decorator(csrf_exempt, name='dispatch')
class CategoryDetailView(DetailView):
model = models.Category
template_name = "category.html"
def get_queryset(self):
return self.model.objects.filter(
active=True, site__domain__iexact=self.request.get_host())
def post(self, request):
return JsonResponse('test', status=200)