mirror of
https://github.com/ae-utbm/sith.git
synced 2024-10-31 19:38:04 +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"
|
||||
|
||||
def get(self, *args, **kwargs):
|
||||
resp = super(UVListView, self).get(*args, **kwargs)
|
||||
if not self.request.GET.get("json", None):
|
||||
# Return normal full template response
|
||||
return resp
|
||||
return super(UVListView, self).get(*args, **kwargs)
|
||||
|
||||
# Return serialized response
|
||||
return HttpResponse(
|
||||
|
Loading…
Reference in New Issue
Block a user