Skip to content

Commit 8fbf1eb

Browse files
committed
django 3 compat
1 parent 880e970 commit 8fbf1eb

File tree

3 files changed

+3
-13
lines changed

3 files changed

+3
-13
lines changed

DjangoGraphs/templates/advanced_graph_view.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{% extends 'base.html' %}
2-
{% load staticfiles %}
2+
{% load static %}
33
{% load i18n %}
44
{% load l10n %}
55
{% load class_tag %}

DjangoGraphs/templates/base.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
{% load staticfiles %}
1+
{% load static %}
22
{% load i18n %}
33
{% load title_tag %}
44

DjangoGraphs/views/api.py

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,16 @@
1-
import datetime
2-
import itertools
3-
import json
4-
5-
import django
6-
from django.core.serializers import serialize
7-
from django.core.serializers.json import DjangoJSONEncoder
81
from django.db.models.functions import TruncHour
9-
from django.http import JsonResponse
102
from rest_framework import permissions, viewsets
113
from rest_framework.response import Response
124
from rest_framework.views import APIView
135

14-
from django.utils.translation import gettext as _
15-
166
from ..serializers import *
177

188

199
class DataEntrySet(viewsets.ModelViewSet):
2010
"""
2111
API endpoint that allows data entries to be viewed or edited.
2212
"""
23-
queryset = DataEntry.objects.all()
13+
queryset = DataEntry.objects.all()[:100]
2414
serializer_class = DataEntrySerializer
2515

2616
permission_classes = (permissions.IsAuthenticated,)

0 commit comments

Comments
 (0)