Hi, everyone.I recently started studying Python and Django.
I would like to ask you about the cause of the unintended GET request after the page is displayed.
When viewing the top page of the web application being created, the screen itself is displayed without any problems (GET200), but the terminal will experience unintended URL access and 404 errors as follows:
Data retrieved from DB is also displayed as intended.
I would appreciate it if you could tell me how to investigate the cause of the request to /null.
[27/May/2022 10:01:39] "GET/HTTP/1.1" 2002515 Not Found:/null
[27/May/2022 10:01:39] "GET/null HTTP/1.1" 404 2622
We have isolated that the following is not the cause.
Share the relevant views.py, urls.py.
urls.py
urlpatterns=[
path(', views.Dashboard.as_view(), name='dashboard'),
]
views.py
class Dashboard (View, LoginRequiredMixin):
default(self, request):
study_records=StudyRecord.objects.filter(recorder=request.user).order_by('-created_date')[:DASHBOARD_RECORD_DISPLAY]
return render(request, 'mystudy/dashboard.html', {'study_records':study_records})
Python 3.10.4
Django 4.0.4
In my case, the mouse gesture tool "crxMouse Chrome™ Gestures" with Chrome extensions was the cause.
This extension inserts style="cursor:url("null"), default;"
into the <body of the html, so an error is displayed.
© 2024 OneMinuteCode. All rights reserved.