Commit 28e9cc7d authored by okhin's avatar okhin 🚴

Fixing the JSONMixin and the LookupView. Issue #22

parent 0f4aa8fa
......@@ -144,7 +144,7 @@ def sendverifymail(service,to,body):
class JSONMixin(object):
def get(self, request, *args, **kwargs):
return http.HttpResponse(serializers.serialize('json', self.get_queryset()))
return HttpResponse(serializers.serialize('json', self.get_queryset()))
class AddForm(FormView, MultipleObjectMixin):
template = 'index.html'
......@@ -259,9 +259,9 @@ def get_attach(request,id):
response['Content-Length'] = f.storage.size
return response
def LookupView(SearchView, JSONMixin):
class LookupView(JSONMixin, SearchView):
model = Violation
form_class = SearchForm
form_class = SearchViolation
#def lookup(request):
# if request.method == 'GET':
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment