Ticket #5160: base.3.py.diff
File base.3.py.diff, 910 bytes (added by , 17 years ago) |
---|
-
django/db/models/base.py
13 13 from django.utils.datastructures import SortedDict 14 14 from django.utils.functional import curry 15 15 from django.utils.encoding import smart_str, force_unicode 16 from django.utils.http import urlquote 16 17 from django.conf import settings 17 18 from itertools import izip 18 19 import types … … 359 360 def _get_FIELD_url(self, field): 360 361 if getattr(self, field.attname): # value is not blank 361 362 import urlparse 362 return urlparse.urljoin(settings.MEDIA_URL, getattr(self, field.attname)).replace('\\', '/')363 return urlparse.urljoin(settings.MEDIA_URL, urlquote(getattr(self, field.attname).replace('\\', '/'))) 363 364 return '' 364 365 365 366 def _get_FIELD_size(self, field):