1
0
mirror of https://github.com/django/django.git synced 2025-10-30 00:56:09 +00:00

Fixed #22114 -- Stopped adding trailing slashes in URLField.to_python

Thanks coredumperror at gmail.com for the report and Tim Graham
for the review.
This commit is contained in:
Claude Paroz
2014-03-26 18:10:58 +01:00
parent b9e50e4774
commit d320863878
3 changed files with 19 additions and 25 deletions

View File

@@ -704,9 +704,6 @@ class URLField(CharField):
# Rebuild the url_fields list, since the domain segment may now
# contain the path too.
url_fields = split_url(urlunsplit(url_fields))
if not url_fields[2]:
# the path portion may need to be added before query params
url_fields[2] = '/'
value = urlunsplit(url_fields)
return value