Использую: russian_presentation_file = RemovableFileField(upload_to=“about/ru/presentation”, blank=True, null=True)
На выходе вот что:
Caught an exception while rendering: 'FieldFile' object has no attribute 'rfind'
Original Traceback (most recent call last):
File "/home/adv/webapps/django/lib/python2.5/django/template/debug.py", line 71, in render_node
result = node.render(context)
File "/home/adv/webapps/django/lib/python2.5/django/template/debug.py", line 87, in render
output = force_unicode(self.filter_expression.resolve(context))
File "/home/adv/webapps/django/lib/python2.5/django/utils/encoding.py", line 71, in force_unicode
s = unicode(s)
File "/home/adv/webapps/django/lib/python2.5/django/forms/forms.py", line 356, in __unicode__
return self.as_widget()
File "/home/adv/webapps/django/lib/python2.5/django/forms/forms.py", line 391, in as_widget
return widget.render(name, data, attrs=attrs)
File "/home/adv/webapps/django/lib/python2.5/django/forms/widgets.py", line 653, in render
output.append(widget.render(name + '_%s' % i, widget_value, final_attrs))
File "/home/adv/webapps/django/adv/pages/removable_fields.py", line 26, in render
s += u'<br><a href="%s%s">%s</a>' % (settings.MEDIA_URL, value, os.path.basename(value))
File "/usr/local/lib/python2.5/posixpath.py", line 112, in basename
return split(p)[1]
File "/usr/local/lib/python2.5/posixpath.py", line 77, in split
i = p.rfind('/') + 1
AttributeError: 'FieldFile' object has no attribute 'rfind'