#26038: FileSystemStorage size() method does not use current MEDIA_ROOT setting
value
-------------------------------------+-------------------------------------
     Reporter:  voutilad             |                    Owner:  nobody
         Type:  Bug                  |                   Status:  new
    Component:  File                 |                  Version:  1.8
  uploads/storage                    |
     Severity:  Normal               |               Resolution:
     Keywords:  testing fieldfile    |             Triage Stage:
                                     |  Unreviewed
    Has patch:  0                    |      Needs documentation:  0
  Needs tests:  0                    |  Patch needs improvement:  0
Easy pickings:  0                    |                    UI/UX:  0
-------------------------------------+-------------------------------------

Comment (by voutilad):

 I've created a simple Django project that recreates the issue and I think
 have identified some more information related to the problem. When using
 the built-in `FileSystemStorage` class, the `@override_settings()` works
 fine against `MEDIA_ROOT`. When creating a new class based on
 `FileSystemStorage`, even when doing nothing (see below), it causes the
 failure.

 '''storage.py'''
 {{{#!python
 from django.core.files.storage import FileSystemStorage

 class SubclassedFileSystemStorage(FileSystemStorage):

     pass

 }}}

 '''models.py:'''
   {{{#!python
 from django.db import models
 from issue26038.storage import SubclassedFileSystemStorage


 class Media(models.Model):
     binary_file = models.FileField(upload_to='prod/')

     diff_storage_binary_file = models.FileField(
         upload_to='prod/',
         storage=SubclassedFileSystemStorage()
     )
 }}}

 I've got a project located in GitHub that quickly recreates the issue:
 [https://github.com/voutilad/django-issue26038]

--
Ticket URL: <https://code.djangoproject.com/ticket/26038#comment:3>
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 django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/066.f24014c7b4705b06c6ee487280ff795a%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to