Fixed #7977: Fixed admindocs to use docstrings instead of a static array to locate type information.

Thanks J. Clifford Dyer.



git-svn-id: http://code.djangoproject.com/svn/django/trunk@11833 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
Karen Tracey 2009-12-12 20:25:41 +00:00
parent 783884af56
commit 0986a4d2e1
9 changed files with 137 additions and 40 deletions

View file

@ -209,6 +209,8 @@ class FileDescriptor(object):
instance.__dict__[self.field.name] = value
class FileField(Field):
"""File path"""
# The class to wrap instance attributes in. Accessing the file object off
# the instance will always return an instance of attr_class.
attr_class = FieldFile
@ -323,6 +325,8 @@ class ImageFieldFile(ImageFile, FieldFile):
super(ImageFieldFile, self).delete(save)
class ImageField(FileField):
"""File path"""
attr_class = ImageFieldFile
descriptor_class = ImageFileDescriptor