#34929: Issue with Django 3.2 and Django-storage 1.14.2 after Upgrading from 
Django
2.2.28
-------------------------------------+-------------------------------------
               Reporter:  akash-     |          Owner:  nobody
  vantage                            |
                   Type:  Bug        |         Status:  new
              Component:  Utilities  |        Version:  3.2
               Severity:  Normal     |       Keywords:  static files,
           Triage Stage:             |  ManifestStaticFilesStorage
  Unreviewed                         |      Has patch:  0
    Needs documentation:  0          |    Needs tests:  0
Patch needs improvement:  0          |  Easy pickings:  0
                  UI/UX:  0          |
-------------------------------------+-------------------------------------
 - Upgraded from Django 2.2.28 to 3.2.
 - Using Django-storage 1.14.2.
 - Replaced CachedFilesMixin with ManifestStaticFilesStorage.
 - Post-upgrade, everything was the same; no other settings changed.
 - Issue: self.location is caching a None value that doesn't alter.
 - Temporary Fix: Deleting the cache in the debugger manually with a del
 statement resolves the issue.
 Code Snippet:
   {{{#!python
   class StaticFilesStorage(ManifestStaticFilesStorage, S3Boto3Storage):
     def __init__(self, *args, **kwargs):
         S3Boto3Storage.__init__(self,
 bucket_name=settings.STATIC_FILES_BUCKET,
 custom_domain=domain(settings.STATIC_URL), *args, **kwargs)
         ManifestStaticFilesStorage.__init__(self, *args, **kwargs)

   }}}
 }}}
 PDB output showing cached None value in self.location:
 {{{
 (Pdb) self.base_location
 'tmp/vantage/static/'
 (Pdb) self.location
 ''
 (Pdb) os.path.abspath(self.base_location)
 '/app/tmp/vantage/static'
 (Pdb) del self.location
 (Pdb) self.location
 '/app/tmp/vantage/static'
 (Pdb) self._location
 'tmp/vantage/static/'
 (Pdb) c
 }}}

-- 
Ticket URL: <https://code.djangoproject.com/ticket/34929>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/0107018b6cc61a66-eeb48fb7-71ff-40e9-a16a-3df5e00dd4bd-000000%40eu-central-1.amazonses.com.

Reply via email to