mirror of
https://github.com/daniviga/django-ram.git
synced 2026-02-04 01:50:39 +01:00
Remove the need of inline scripting
This commit is contained in:
@@ -7,7 +7,7 @@ from urllib.parse import unquote
|
||||
from django.conf import settings
|
||||
from django.views import View
|
||||
from django.urls import Resolver404
|
||||
from django.http import Http404, HttpResponseBadRequest
|
||||
from django.http import Http404, HttpResponse, HttpResponseBadRequest
|
||||
from django.db.utils import OperationalError, ProgrammingError
|
||||
from django.db.models import F, Q, Count
|
||||
from django.db.models.functions import Lower
|
||||
@@ -78,6 +78,16 @@ class Render404(View):
|
||||
)
|
||||
|
||||
|
||||
class RenderExtraJS(View):
|
||||
def get(self, request):
|
||||
try:
|
||||
extra_js = get_site_conf().extra_js
|
||||
except (OperationalError, ProgrammingError):
|
||||
extra_js = ""
|
||||
|
||||
return HttpResponse(extra_js, content_type="application/javascript")
|
||||
|
||||
|
||||
class GetData(View):
|
||||
title = None
|
||||
template = "pagination.html"
|
||||
|
||||
Reference in New Issue
Block a user