Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

To avoid error when lunching runserver (QUERY_STRING) #33

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

cavanierc
Copy link

To avoid getting an error when launching the runserver if QUERY_STRING has not yet been set.

2024-05-29 09:20:41,724 django.request - ERROR Internal Server Error: /
Traceback (most recent call last):
  File ".../lib/python3.12/site-packages/django/core/handlers/exception.py", line 55, in inner
    response = get_response(request)
               ^^^^^^^^^^^^^^^^^^^^^
  File ".../lib/python3.12/site-packages/django/utils/deprecation.py", line 133, in __call__
    response = self.process_request(request)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File ".../lib/python3.12/site-packages/querycount/middleware.py", line 109, in process_request
    self.query_string = request.META['QUERY_STRING']
                        ~~~~~~~~~~~~^^^^^^^^^^^^^^^^
KeyError: 'QUERY_STRING'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant