Skip to content

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