mirror of https://github.com/django/django.git
Refs #32956 -- Changed "afterwards" to "afterward" in docs and comments.
This also removes unnecessary comments with the previous spelling. AP Stylebook has a short entry to advise the preferred spelling for "en-us". "Afterwards" is preferred in British English.
This commit is contained in:
parent
3d9040a50b
commit
1cba320786
|
@ -156,7 +156,7 @@ class BaseDatabaseSchemaEditor:
|
||||||
def table_sql(self, model):
|
def table_sql(self, model):
|
||||||
"""Take a model and return its table definition."""
|
"""Take a model and return its table definition."""
|
||||||
# Add any unique_togethers (always deferred, as some fields might be
|
# Add any unique_togethers (always deferred, as some fields might be
|
||||||
# created afterwards, like geometry fields with some backends).
|
# created afterward, like geometry fields with some backends).
|
||||||
for field_names in model._meta.unique_together:
|
for field_names in model._meta.unique_together:
|
||||||
fields = [model._meta.get_field(field) for field in field_names]
|
fields = [model._meta.get_field(field) for field in field_names]
|
||||||
self.deferred_sql.append(self._create_unique_sql(model, fields))
|
self.deferred_sql.append(self._create_unique_sql(model, fields))
|
||||||
|
|
|
@ -100,7 +100,7 @@ class MigrationGraph:
|
||||||
"""
|
"""
|
||||||
This may create dummy nodes if they don't yet exist. If
|
This may create dummy nodes if they don't yet exist. If
|
||||||
`skip_validation=True`, validate_consistency() should be called
|
`skip_validation=True`, validate_consistency() should be called
|
||||||
afterwards.
|
afterward.
|
||||||
"""
|
"""
|
||||||
if child not in self.nodes:
|
if child not in self.nodes:
|
||||||
error_message = (
|
error_message = (
|
||||||
|
|
|
@ -132,7 +132,7 @@ We can now run the queries we had before.
|
||||||
SELECT ... WHERE ABS("experiments"."change") = 27
|
SELECT ... WHERE ABS("experiments"."change") = 27
|
||||||
|
|
||||||
By using ``Transform`` instead of ``Lookup`` it means we are able to chain
|
By using ``Transform`` instead of ``Lookup`` it means we are able to chain
|
||||||
further lookups afterwards. So
|
further lookups afterward. So
|
||||||
``Experiment.objects.filter(change__abs__lt=27)`` will generate the following
|
``Experiment.objects.filter(change__abs__lt=27)`` will generate the following
|
||||||
SQL:
|
SQL:
|
||||||
|
|
||||||
|
|
|
@ -21,7 +21,7 @@ Required Reading
|
||||||
If it's your first time doing an upgrade, it is useful to read the :doc:`guide
|
If it's your first time doing an upgrade, it is useful to read the :doc:`guide
|
||||||
on the different release processes </internals/release-process>`.
|
on the different release processes </internals/release-process>`.
|
||||||
|
|
||||||
Afterwards, you should familiarize yourself with the changes that were made in
|
Afterward, you should familiarize yourself with the changes that were made in
|
||||||
the new Django version(s):
|
the new Django version(s):
|
||||||
|
|
||||||
* Read the :doc:`release notes </releases/index>` for each 'final' release from
|
* Read the :doc:`release notes </releases/index>` for each 'final' release from
|
||||||
|
|
|
@ -80,7 +80,7 @@ The documentation is organized into several categories:
|
||||||
understands what we're trying to achieve. Don't feel that you need to begin
|
understands what we're trying to achieve. Don't feel that you need to begin
|
||||||
with explanations of how things work - what matters is what the reader does,
|
with explanations of how things work - what matters is what the reader does,
|
||||||
not what you explain. It can be helpful to refer back to what you've done and
|
not what you explain. It can be helpful to refer back to what you've done and
|
||||||
explain afterwards.
|
explain afterward.
|
||||||
|
|
||||||
* :doc:`Topic guides </topics/index>` aim to explain a concept or subject at a
|
* :doc:`Topic guides </topics/index>` aim to explain a concept or subject at a
|
||||||
fairly high level.
|
fairly high level.
|
||||||
|
|
|
@ -292,7 +292,7 @@ Download the framework packages for:
|
||||||
Install the packages in the order they are listed above, as the GDAL and SQLite
|
Install the packages in the order they are listed above, as the GDAL and SQLite
|
||||||
packages require the packages listed before them.
|
packages require the packages listed before them.
|
||||||
|
|
||||||
Afterwards, you can also install the KyngChaos binary packages for `PostgreSQL
|
Afterward, you can also install the KyngChaos binary packages for `PostgreSQL
|
||||||
and PostGIS`__.
|
and PostGIS`__.
|
||||||
|
|
||||||
After installing the binary packages, you'll want to add the following to
|
After installing the binary packages, you'll want to add the following to
|
||||||
|
|
|
@ -471,7 +471,7 @@ A few notes about what's going on:
|
||||||
* The ``transform`` keyword is set to ``False`` because the data in the
|
* The ``transform`` keyword is set to ``False`` because the data in the
|
||||||
shapefile does not need to be converted -- it's already in WGS84 (SRID=4326).
|
shapefile does not need to be converted -- it's already in WGS84 (SRID=4326).
|
||||||
|
|
||||||
Afterwards, invoke the Django shell from the ``geodjango`` project directory:
|
Afterward, invoke the Django shell from the ``geodjango`` project directory:
|
||||||
|
|
||||||
.. console::
|
.. console::
|
||||||
|
|
||||||
|
|
|
@ -182,7 +182,7 @@ the SQL operator ``&&``. For example::
|
||||||
``len``
|
``len``
|
||||||
~~~~~~~
|
~~~~~~~
|
||||||
|
|
||||||
Returns the length of the array. The lookups available afterwards are those
|
Returns the length of the array. The lookups available afterward are those
|
||||||
available for :class:`~django.db.models.IntegerField`. For example::
|
available for :class:`~django.db.models.IntegerField`. For example::
|
||||||
|
|
||||||
>>> Post.objects.create(name='First post', tags=['thoughts', 'django'])
|
>>> Post.objects.create(name='First post', tags=['thoughts', 'django'])
|
||||||
|
|
|
@ -295,7 +295,7 @@ cause a conflict. For example::
|
||||||
IntegrityError: duplicate key value violates unique constraint
|
IntegrityError: duplicate key value violates unique constraint
|
||||||
"auth_user_pkey" DETAIL: Key (id)=(1) already exists.
|
"auth_user_pkey" DETAIL: Key (id)=(1) already exists.
|
||||||
|
|
||||||
If you need to specify such values, reset the sequence afterwards to avoid
|
If you need to specify such values, reset the sequence afterward to avoid
|
||||||
reusing a value that's already in the table. The :djadmin:`sqlsequencereset`
|
reusing a value that's already in the table. The :djadmin:`sqlsequencereset`
|
||||||
management command generates the SQL statements to do that.
|
management command generates the SQL statements to do that.
|
||||||
|
|
||||||
|
|
|
@ -559,7 +559,7 @@ Miscellaneous
|
||||||
|
|
||||||
* Assigning a value to a model's :class:`~django.db.models.ForeignKey` or
|
* Assigning a value to a model's :class:`~django.db.models.ForeignKey` or
|
||||||
:class:`~django.db.models.OneToOneField` ``'_id'`` attribute now unsets the
|
:class:`~django.db.models.OneToOneField` ``'_id'`` attribute now unsets the
|
||||||
corresponding field. Accessing the field afterwards will result in a query.
|
corresponding field. Accessing the field afterward will result in a query.
|
||||||
|
|
||||||
* :func:`~django.utils.cache.patch_vary_headers` now handles an asterisk
|
* :func:`~django.utils.cache.patch_vary_headers` now handles an asterisk
|
||||||
``'*'`` according to :rfc:`7231#section-7.1.4`, i.e. if a list of header
|
``'*'`` according to :rfc:`7231#section-7.1.4`, i.e. if a list of header
|
||||||
|
|
|
@ -420,7 +420,7 @@ The email backend class has the following methods:
|
||||||
* ``send_messages(email_messages)`` sends a list of
|
* ``send_messages(email_messages)`` sends a list of
|
||||||
:class:`~django.core.mail.EmailMessage` objects. If the connection is
|
:class:`~django.core.mail.EmailMessage` objects. If the connection is
|
||||||
not open, this call will implicitly open the connection, and close the
|
not open, this call will implicitly open the connection, and close the
|
||||||
connection afterwards. If the connection is already open, it will be
|
connection afterward. If the connection is already open, it will be
|
||||||
left open after mail has been sent.
|
left open after mail has been sent.
|
||||||
|
|
||||||
It can also be used as a context manager, which will automatically call
|
It can also be used as a context manager, which will automatically call
|
||||||
|
|
|
@ -201,7 +201,7 @@ migration will contain a dependency on a migration in ``authors``.
|
||||||
|
|
||||||
This means that when you run the migrations, the ``authors`` migration runs
|
This means that when you run the migrations, the ``authors`` migration runs
|
||||||
first and creates the table the ``ForeignKey`` references, and then the migration
|
first and creates the table the ``ForeignKey`` references, and then the migration
|
||||||
that makes the ``ForeignKey`` column runs afterwards and creates the constraint.
|
that makes the ``ForeignKey`` column runs afterward and creates the constraint.
|
||||||
If this didn't happen, the migration would try to create the ``ForeignKey``
|
If this didn't happen, the migration would try to create the ``ForeignKey``
|
||||||
column without the table it's referencing existing and your database would
|
column without the table it's referencing existing and your database would
|
||||||
throw an error.
|
throw an error.
|
||||||
|
|
|
@ -1260,7 +1260,7 @@ Django provides a standard Python context manager (see :pep:`343`) called
|
||||||
self.assertRedirects(response, '/other/login/?next=/sekrit/')
|
self.assertRedirects(response, '/other/login/?next=/sekrit/')
|
||||||
|
|
||||||
This example will override the :setting:`LOGIN_URL` setting for the code
|
This example will override the :setting:`LOGIN_URL` setting for the code
|
||||||
in the ``with`` block and reset its value to the previous state afterwards.
|
in the ``with`` block and reset its value to the previous state afterward.
|
||||||
|
|
||||||
.. method:: SimpleTestCase.modify_settings()
|
.. method:: SimpleTestCase.modify_settings()
|
||||||
|
|
||||||
|
|
|
@ -310,7 +310,7 @@ class StateTests(SimpleTestCase):
|
||||||
def test_apps_bulk_update(self):
|
def test_apps_bulk_update(self):
|
||||||
"""
|
"""
|
||||||
StateApps.bulk_update() should update apps.ready to False and reset
|
StateApps.bulk_update() should update apps.ready to False and reset
|
||||||
the value afterwards.
|
the value afterward.
|
||||||
"""
|
"""
|
||||||
project_state = ProjectState()
|
project_state = ProjectState()
|
||||||
apps = project_state.apps
|
apps = project_state.apps
|
||||||
|
|
|
@ -34,7 +34,7 @@ class NullFkOrderingTests(TestCase):
|
||||||
Comment.objects.create(post=p2, comment_text='Another second comment')
|
Comment.objects.create(post=p2, comment_text='Another second comment')
|
||||||
|
|
||||||
# We have to test this carefully. Some databases sort NULL values before
|
# We have to test this carefully. Some databases sort NULL values before
|
||||||
# everything else, some sort them afterwards. So we extract the ordered list
|
# everything else, some sort them afterward. So we extract the ordered list
|
||||||
# and check the length. Before the fix, this list was too short (some values
|
# and check the length. Before the fix, this list was too short (some values
|
||||||
# were omitted).
|
# were omitted).
|
||||||
self.assertEqual(len(list(Comment.objects.all())), 4)
|
self.assertEqual(len(list(Comment.objects.all())), 4)
|
||||||
|
|
|
@ -520,7 +520,6 @@ class SchemaTests(TransactionTestCase):
|
||||||
'column': editor.quote_name(new_field.name),
|
'column': editor.quote_name(new_field.name),
|
||||||
}
|
}
|
||||||
self.assertFalse(any(drop_default_sql in query['sql'] for query in ctx.captured_queries))
|
self.assertFalse(any(drop_default_sql in query['sql'] for query in ctx.captured_queries))
|
||||||
# Ensure the field is right afterwards
|
|
||||||
columns = self.column_classes(Author)
|
columns = self.column_classes(Author)
|
||||||
self.assertEqual(columns['age'][0], connection.features.introspected_field_types['IntegerField'])
|
self.assertEqual(columns['age'][0], connection.features.introspected_field_types['IntegerField'])
|
||||||
self.assertTrue(columns['age'][1][6])
|
self.assertTrue(columns['age'][1][6])
|
||||||
|
@ -554,7 +553,6 @@ class SchemaTests(TransactionTestCase):
|
||||||
new_field.set_attributes_from_name("surname")
|
new_field.set_attributes_from_name("surname")
|
||||||
with connection.schema_editor() as editor:
|
with connection.schema_editor() as editor:
|
||||||
editor.add_field(Author, new_field)
|
editor.add_field(Author, new_field)
|
||||||
# Ensure the field is right afterwards
|
|
||||||
columns = self.column_classes(Author)
|
columns = self.column_classes(Author)
|
||||||
self.assertEqual(columns['surname'][0], connection.features.introspected_field_types['CharField'])
|
self.assertEqual(columns['surname'][0], connection.features.introspected_field_types['CharField'])
|
||||||
self.assertEqual(columns['surname'][1][6],
|
self.assertEqual(columns['surname'][1][6],
|
||||||
|
@ -579,7 +577,6 @@ class SchemaTests(TransactionTestCase):
|
||||||
new_field.set_attributes_from_name("awesome")
|
new_field.set_attributes_from_name("awesome")
|
||||||
with connection.schema_editor() as editor:
|
with connection.schema_editor() as editor:
|
||||||
editor.add_field(Author, new_field)
|
editor.add_field(Author, new_field)
|
||||||
# Ensure the field is right afterwards
|
|
||||||
columns = self.column_classes(Author)
|
columns = self.column_classes(Author)
|
||||||
# BooleanField are stored as TINYINT(1) on MySQL.
|
# BooleanField are stored as TINYINT(1) on MySQL.
|
||||||
field_type = columns['awesome'][0]
|
field_type = columns['awesome'][0]
|
||||||
|
@ -632,7 +629,6 @@ class SchemaTests(TransactionTestCase):
|
||||||
new_field.set_attributes_from_name("bits")
|
new_field.set_attributes_from_name("bits")
|
||||||
with connection.schema_editor() as editor:
|
with connection.schema_editor() as editor:
|
||||||
editor.add_field(Author, new_field)
|
editor.add_field(Author, new_field)
|
||||||
# Ensure the field is right afterwards
|
|
||||||
columns = self.column_classes(Author)
|
columns = self.column_classes(Author)
|
||||||
# MySQL annoyingly uses the same backend, so it'll come back as one of
|
# MySQL annoyingly uses the same backend, so it'll come back as one of
|
||||||
# these two types.
|
# these two types.
|
||||||
|
@ -672,7 +668,6 @@ class SchemaTests(TransactionTestCase):
|
||||||
new_field.set_attributes_from_name("name")
|
new_field.set_attributes_from_name("name")
|
||||||
with connection.schema_editor() as editor:
|
with connection.schema_editor() as editor:
|
||||||
editor.alter_field(Author, old_field, new_field, strict=True)
|
editor.alter_field(Author, old_field, new_field, strict=True)
|
||||||
# Ensure the field is right afterwards
|
|
||||||
columns = self.column_classes(Author)
|
columns = self.column_classes(Author)
|
||||||
self.assertEqual(columns['name'][0], "TextField")
|
self.assertEqual(columns['name'][0], "TextField")
|
||||||
self.assertTrue(columns['name'][1][6])
|
self.assertTrue(columns['name'][1][6])
|
||||||
|
@ -681,7 +676,6 @@ class SchemaTests(TransactionTestCase):
|
||||||
new_field2.set_attributes_from_name("name")
|
new_field2.set_attributes_from_name("name")
|
||||||
with connection.schema_editor() as editor:
|
with connection.schema_editor() as editor:
|
||||||
editor.alter_field(Author, new_field, new_field2, strict=True)
|
editor.alter_field(Author, new_field, new_field2, strict=True)
|
||||||
# Ensure the field is right afterwards
|
|
||||||
columns = self.column_classes(Author)
|
columns = self.column_classes(Author)
|
||||||
self.assertEqual(columns['name'][0], "TextField")
|
self.assertEqual(columns['name'][0], "TextField")
|
||||||
self.assertEqual(bool(columns['name'][1][6]), bool(connection.features.interprets_empty_strings_as_nulls))
|
self.assertEqual(bool(columns['name'][1][6]), bool(connection.features.interprets_empty_strings_as_nulls))
|
||||||
|
@ -907,7 +901,6 @@ class SchemaTests(TransactionTestCase):
|
||||||
new_field.set_attributes_from_name("height")
|
new_field.set_attributes_from_name("height")
|
||||||
with connection.schema_editor() as editor:
|
with connection.schema_editor() as editor:
|
||||||
editor.alter_field(Author, old_field, new_field, strict=True)
|
editor.alter_field(Author, old_field, new_field, strict=True)
|
||||||
# Ensure the field is right afterwards
|
|
||||||
columns = self.column_classes(Author)
|
columns = self.column_classes(Author)
|
||||||
self.assertFalse(columns['height'][1][6])
|
self.assertFalse(columns['height'][1][6])
|
||||||
# Verify default value
|
# Verify default value
|
||||||
|
@ -1045,7 +1038,6 @@ class SchemaTests(TransactionTestCase):
|
||||||
new_field.set_attributes_from_name("height")
|
new_field.set_attributes_from_name("height")
|
||||||
with connection.schema_editor() as editor:
|
with connection.schema_editor() as editor:
|
||||||
editor.alter_field(AuthorWithDefaultHeight, old_field, new_field, strict=True)
|
editor.alter_field(AuthorWithDefaultHeight, old_field, new_field, strict=True)
|
||||||
# Ensure the field is right afterwards
|
|
||||||
columns = self.column_classes(AuthorWithDefaultHeight)
|
columns = self.column_classes(AuthorWithDefaultHeight)
|
||||||
self.assertFalse(columns['height'][1][6])
|
self.assertFalse(columns['height'][1][6])
|
||||||
|
|
||||||
|
@ -1068,7 +1060,6 @@ class SchemaTests(TransactionTestCase):
|
||||||
new_field.set_attributes_from_name("author")
|
new_field.set_attributes_from_name("author")
|
||||||
with connection.schema_editor() as editor:
|
with connection.schema_editor() as editor:
|
||||||
editor.alter_field(Book, old_field, new_field, strict=True)
|
editor.alter_field(Book, old_field, new_field, strict=True)
|
||||||
# Ensure the field is right afterwards
|
|
||||||
columns = self.column_classes(Book)
|
columns = self.column_classes(Book)
|
||||||
self.assertEqual(columns['author_id'][0], connection.features.introspected_field_types['IntegerField'])
|
self.assertEqual(columns['author_id'][0], connection.features.introspected_field_types['IntegerField'])
|
||||||
self.assertForeignKeyExists(Book, 'author_id', 'schema_author')
|
self.assertForeignKeyExists(Book, 'author_id', 'schema_author')
|
||||||
|
@ -1130,7 +1121,6 @@ class SchemaTests(TransactionTestCase):
|
||||||
new_field.set_attributes_from_name("author")
|
new_field.set_attributes_from_name("author")
|
||||||
with connection.schema_editor() as editor:
|
with connection.schema_editor() as editor:
|
||||||
editor.alter_field(BookWithO2O, old_field, new_field, strict=True)
|
editor.alter_field(BookWithO2O, old_field, new_field, strict=True)
|
||||||
# Ensure the field is right afterwards
|
|
||||||
columns = self.column_classes(Book)
|
columns = self.column_classes(Book)
|
||||||
self.assertEqual(columns['author_id'][0], connection.features.introspected_field_types['IntegerField'])
|
self.assertEqual(columns['author_id'][0], connection.features.introspected_field_types['IntegerField'])
|
||||||
# Ensure the field is not unique anymore
|
# Ensure the field is not unique anymore
|
||||||
|
@ -1162,7 +1152,6 @@ class SchemaTests(TransactionTestCase):
|
||||||
new_field.set_attributes_from_name("author")
|
new_field.set_attributes_from_name("author")
|
||||||
with connection.schema_editor() as editor:
|
with connection.schema_editor() as editor:
|
||||||
editor.alter_field(Book, old_field, new_field, strict=True)
|
editor.alter_field(Book, old_field, new_field, strict=True)
|
||||||
# Ensure the field is right afterwards
|
|
||||||
columns = self.column_classes(BookWithO2O)
|
columns = self.column_classes(BookWithO2O)
|
||||||
self.assertEqual(columns['author_id'][0], connection.features.introspected_field_types['IntegerField'])
|
self.assertEqual(columns['author_id'][0], connection.features.introspected_field_types['IntegerField'])
|
||||||
# Ensure the field is unique now
|
# Ensure the field is unique now
|
||||||
|
@ -1523,7 +1512,6 @@ class SchemaTests(TransactionTestCase):
|
||||||
new_field.set_attributes_from_name("display_name")
|
new_field.set_attributes_from_name("display_name")
|
||||||
with connection.schema_editor() as editor:
|
with connection.schema_editor() as editor:
|
||||||
editor.alter_field(Author, old_field, new_field, strict=True)
|
editor.alter_field(Author, old_field, new_field, strict=True)
|
||||||
# Ensure the field is right afterwards
|
|
||||||
columns = self.column_classes(Author)
|
columns = self.column_classes(Author)
|
||||||
self.assertEqual(columns['display_name'][0], connection.features.introspected_field_types['CharField'])
|
self.assertEqual(columns['display_name'][0], connection.features.introspected_field_types['CharField'])
|
||||||
self.assertNotIn("name", columns)
|
self.assertNotIn("name", columns)
|
||||||
|
@ -2603,7 +2591,6 @@ class SchemaTests(TransactionTestCase):
|
||||||
# Alter the table
|
# Alter the table
|
||||||
with connection.schema_editor(atomic=connection.features.supports_atomic_references_rename) as editor:
|
with connection.schema_editor(atomic=connection.features.supports_atomic_references_rename) as editor:
|
||||||
editor.alter_db_table(Author, "schema_author", "schema_otherauthor")
|
editor.alter_db_table(Author, "schema_author", "schema_otherauthor")
|
||||||
# Ensure the table is there afterwards
|
|
||||||
Author._meta.db_table = "schema_otherauthor"
|
Author._meta.db_table = "schema_otherauthor"
|
||||||
columns = self.column_classes(Author)
|
columns = self.column_classes(Author)
|
||||||
self.assertEqual(columns['name'][0], connection.features.introspected_field_types['CharField'])
|
self.assertEqual(columns['name'][0], connection.features.introspected_field_types['CharField'])
|
||||||
|
|
|
@ -324,7 +324,7 @@ class CreateDefaultSiteTests(TestCase):
|
||||||
create_default_site(self.app_config, verbosity=0)
|
create_default_site(self.app_config, verbosity=0)
|
||||||
self.assertEqual(Site.objects.get().pk, 35696)
|
self.assertEqual(Site.objects.get().pk, 35696)
|
||||||
|
|
||||||
@override_settings() # Restore original ``SITE_ID`` afterwards.
|
@override_settings() # Restore original ``SITE_ID`` afterward.
|
||||||
def test_no_site_id(self):
|
def test_no_site_id(self):
|
||||||
"""
|
"""
|
||||||
#24488 - The pk should default to 1 if no ``SITE_ID`` is configured.
|
#24488 - The pk should default to 1 if no ``SITE_ID`` is configured.
|
||||||
|
|
|
@ -313,28 +313,28 @@ class FunctionTests(SimpleTestCase):
|
||||||
#20364 - Check urlize correctly include quotation marks in links
|
#20364 - Check urlize correctly include quotation marks in links
|
||||||
"""
|
"""
|
||||||
self.assertEqual(
|
self.assertEqual(
|
||||||
urlize('before "hi@example.com" afterwards', autoescape=False),
|
urlize('before "hi@example.com" afterward', autoescape=False),
|
||||||
'before "<a href="mailto:hi@example.com">hi@example.com</a>" afterwards',
|
'before "<a href="mailto:hi@example.com">hi@example.com</a>" afterward',
|
||||||
)
|
)
|
||||||
self.assertEqual(
|
self.assertEqual(
|
||||||
urlize('before hi@example.com" afterwards', autoescape=False),
|
urlize('before hi@example.com" afterward', autoescape=False),
|
||||||
'before <a href="mailto:hi@example.com">hi@example.com</a>" afterwards',
|
'before <a href="mailto:hi@example.com">hi@example.com</a>" afterward',
|
||||||
)
|
)
|
||||||
self.assertEqual(
|
self.assertEqual(
|
||||||
urlize('before "hi@example.com afterwards', autoescape=False),
|
urlize('before "hi@example.com afterward', autoescape=False),
|
||||||
'before "<a href="mailto:hi@example.com">hi@example.com</a> afterwards',
|
'before "<a href="mailto:hi@example.com">hi@example.com</a> afterward',
|
||||||
)
|
)
|
||||||
self.assertEqual(
|
self.assertEqual(
|
||||||
urlize('before \'hi@example.com\' afterwards', autoescape=False),
|
urlize('before \'hi@example.com\' afterward', autoescape=False),
|
||||||
'before \'<a href="mailto:hi@example.com">hi@example.com</a>\' afterwards',
|
'before \'<a href="mailto:hi@example.com">hi@example.com</a>\' afterward',
|
||||||
)
|
)
|
||||||
self.assertEqual(
|
self.assertEqual(
|
||||||
urlize('before hi@example.com\' afterwards', autoescape=False),
|
urlize('before hi@example.com\' afterward', autoescape=False),
|
||||||
'before <a href="mailto:hi@example.com">hi@example.com</a>\' afterwards',
|
'before <a href="mailto:hi@example.com">hi@example.com</a>\' afterward',
|
||||||
)
|
)
|
||||||
self.assertEqual(
|
self.assertEqual(
|
||||||
urlize('before \'hi@example.com afterwards', autoescape=False),
|
urlize('before \'hi@example.com afterward', autoescape=False),
|
||||||
'before \'<a href="mailto:hi@example.com">hi@example.com</a> afterwards',
|
'before \'<a href="mailto:hi@example.com">hi@example.com</a> afterward',
|
||||||
)
|
)
|
||||||
|
|
||||||
def test_quote_commas(self):
|
def test_quote_commas(self):
|
||||||
|
|
Loading…
Reference in New Issue