Ticket #5160: base.py.diff
File base.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 url parse.urljoin(settings.MEDIA_URL, getattr(self, field.attname)).replace('\\', '/')361 import urlparse, urllib 362 return urllib.quote(urlparse.urljoin(settings.MEDIA_URL, getattr(self, field.attname)).replace('\\', '/')) 363 363 return '' 364 364 365 365 def _get_FIELD_size(self, field):