mirror of
https://github.com/django/django.git
synced 2025-11-07 07:15:35 +00:00
Fixed #16833 -- Removed undocumented mixin parameter from the Storage.open() method as this was an undocumented and obscure feature. Thanks to Marty and Russell for sanity-checking.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16824 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
@@ -25,16 +25,11 @@ class Storage(object):
|
||||
# The following methods represent a public interface to private methods.
|
||||
# These shouldn't be overridden by subclasses unless absolutely necessary.
|
||||
|
||||
def open(self, name, mode='rb', mixin=None):
|
||||
def open(self, name, mode='rb'):
|
||||
"""
|
||||
Retrieves the specified file from storage, using the optional mixin
|
||||
class to customize what features are available on the File returned.
|
||||
Retrieves the specified file from storage.
|
||||
"""
|
||||
file = self._open(name, mode)
|
||||
if mixin:
|
||||
# Add the mixin as a parent class of the File returned from storage.
|
||||
file.__class__ = type(mixin.__name__, (mixin, file.__class__), {})
|
||||
return file
|
||||
return self._open(name, mode)
|
||||
|
||||
def save(self, name, content):
|
||||
"""
|
||||
|
||||
Reference in New Issue
Block a user