mirror of
https://github.com/django/django.git
synced 2025-10-23 21:59:11 +00:00
Fixed #22313 -- Removed 'u' prefixes from documentation
This commit is contained in:
@@ -201,9 +201,9 @@ like that.
|
||||
|
||||
An example might clarify things here::
|
||||
|
||||
>>> urlquote(u'Paris & Orléans')
|
||||
u'Paris%20%26%20Orl%C3%A9ans'
|
||||
>>> iri_to_uri(u'/favorites/François/%s' % urlquote('Paris & Orléans'))
|
||||
>>> urlquote('Paris & Orléans')
|
||||
'Paris%20%26%20Orl%C3%A9ans'
|
||||
>>> iri_to_uri('/favorites/François/%s' % urlquote('Paris & Orléans'))
|
||||
'/favorites/Fran%C3%A7ois/Paris%20%26%20Orl%C3%A9ans'
|
||||
|
||||
If you look carefully, you can see that the portion that was generated by
|
||||
@@ -279,7 +279,7 @@ above_. For example::
|
||||
from django.utils.http import urlquote
|
||||
|
||||
def get_absolute_url(self):
|
||||
url = u'/person/%s/?x=0&y=0' % urlquote(self.location)
|
||||
url = '/person/%s/?x=0&y=0' % urlquote(self.location)
|
||||
return iri_to_uri(url)
|
||||
|
||||
This function returns a correctly encoded URL even if ``self.location`` is
|
||||
|
||||
Reference in New Issue
Block a user