mirror of
https://github.com/ae-utbm/sith.git
synced 2024-11-26 02:54:20 +00:00
pedagogy: improve performances on json mode for UVListView
This commit is contained in:
parent
49f928e754
commit
d844bccb04
@ -158,10 +158,9 @@ class UVListView(CanViewMixin, CanCreateUVFunctionMixin, ListView):
|
|||||||
template_name = "pedagogy/guide.jinja"
|
template_name = "pedagogy/guide.jinja"
|
||||||
|
|
||||||
def get(self, *args, **kwargs):
|
def get(self, *args, **kwargs):
|
||||||
resp = super(UVListView, self).get(*args, **kwargs)
|
|
||||||
if not self.request.GET.get("json", None):
|
if not self.request.GET.get("json", None):
|
||||||
# Return normal full template response
|
# Return normal full template response
|
||||||
return resp
|
return super(UVListView, self).get(*args, **kwargs)
|
||||||
|
|
||||||
# Return serialized response
|
# Return serialized response
|
||||||
return HttpResponse(
|
return HttpResponse(
|
||||||
|
Loading…
Reference in New Issue
Block a user