1
0
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:
Jannis Leidel
2011-09-13 15:10:49 +00:00
parent 3513234cf8
commit f3ae496201
3 changed files with 27 additions and 28 deletions

View File

@@ -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):
"""