Skip to content

Commit

Permalink
Use method decorator on widget
Browse files Browse the repository at this point in the history
  • Loading branch information
symroe committed Nov 21, 2023
1 parent 8feec6c commit a59fd20
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion ec_api/apps/frontend/views.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import requests
from django.http import HttpResponse
from django.utils.decorators import method_decorator
from django.views import View
from django.views.decorators.cache import cache_control
from django.views.generic import TemplateView
Expand All @@ -16,7 +17,7 @@ class WidgetView(TemplateView):


class WidgetJSView(View):
@cache_control(max_age=600)
@method_decorator(cache_control(max_age=600))
def get(self, request, *args, **kwargs):
req = requests.get(WIDGET_S3_URL)
req.raise_for_status()
Expand Down

0 comments on commit a59fd20

Please sign in to comment.