Changes between Version 2 and Version 3 of Ticket #32659, comment 2


Ignore:
Timestamp:
Apr 23, 2021, 6:11:03 PM (3 years ago)
Author:
Steven Mapes

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #32659, comment 2

    v2 v3  
    1 I've encountered this myself tonight in one of my projects. For me the problem was caching of static files. I use Django Storages with S3 and Cloudfront and even after invalidating files on AWS and re-running collect static I get the HTTP403. If I disable django-storages it "fixes" it.  It's not a solution I can use for production.  I'm confused as to why serving static files from a different domain would be causing a 403 though /admin/autocomplete/
     1I've encountered this myself tonight in one of my projects. For me the problem was caching of static files. I use Django Storages with S3 and Cloudfront and even after invalidating files on AWS and re-running collect static I get the HTTP403. If I disable django-storages it "fixes" it. As the initiator is jQuery it's likely the op has a similar issue where a collectstatic is not pushed update files and so an older version of jQuery is being loaded that it not making the correct request.
    22
    3 *update*
     3Django wise the issue is results in  ''django.contrib.admin.views.autocomplete.AutocompleteJsonView.process_request'' having an empty request.GET QueryDict
    44
    5 The issue is that the request hits ''django.contrib.admin.views.autocomplete.AutocompleteJsonView.process_request'' where a `KeyError` occurs for app_label because request.GET is an empty QueryDict
    6 
    7 
    8 * update 2*
    9 When Django Storages is turned off request.GET is the following
    10 
    11 
    12 {{{
    13 <QueryDict: {'app_label': ['example'], 'model_name': ['examplemodel'], 'field_name': ['lookup']}>
    14 }}}
    15 
Back to Top