Moved private method to make class more readable

This commit is contained in:
Ross Lawley 2011-06-27 13:17:41 +01:00
parent b039a2293f
commit 4036e9fe34

View File

@ -775,11 +775,6 @@ class GridFSProxy(object):
self.gridout = None
self._mark_as_changed()
def _mark_as_changed(self):
"""Inform the instance that `self.key` has been changed"""
if self.instance:
self.instance._mark_as_changed(self.key)
def replace(self, file_obj, **kwargs):
self.delete()
self.put(file_obj, **kwargs)
@ -788,6 +783,11 @@ class GridFSProxy(object):
if self.newfile:
self.newfile.close()
def _mark_as_changed(self):
"""Inform the instance that `self.key` has been changed"""
if self.instance:
self.instance._mark_as_changed(self.key)
class FileField(BaseField):
"""A GridFS storage field.