Ticket #5160: base.2.py.diff
File base.2.py.diff, 664 bytes (added by , 17 years ago) |
---|
-
django/db/models/base.py
358 358 359 359 def _get_FIELD_url(self, field): 360 360 if getattr(self, field.attname): # value is not blank 361 import urlparse 362 return urlparse.urljoin(settings.MEDIA_URL, getattr(self, field.attname)).replace('\\', '/')361 import urlparse, urllib 362 return urlparse.urljoin(settings.MEDIA_URL, urllib.quote(getattr(self, field.attname).replace('\\', '/'))) 363 363 return '' 364 364 365 365 def _get_FIELD_size(self, field):