Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 9 additions & 2 deletions docs/topics/tasks.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ Django's Tasks framework

.. versionadded:: 6.0

For older Django versions, the :pypi:`django-tasks` backport is available.

For a web application, there's often more than just turning HTTP requests into
HTTP responses. For some functionality, it may be beneficial to run code
outside the request-response cycle.
Expand Down Expand Up @@ -113,8 +115,13 @@ Third-party backends

As mentioned at the beginning of this section, Django includes backends
suitable for development and testing only. Production systems should rely on
backends that supply a worker process and durable queue implementation. To use
an external Task backend with Django, use the Python import path as the
backends that supply a worker process and a durable queue implementation.
Available third-party backends are listed on the `Community Ecosystem page
<https://www.djangoproject.com/community/ecosystem/#tasks>`__ and the `Tasks
framework grid from Django Packages
<https://djangopackages.org/grids/g/task-framework/>`__.

To use an external Task backend with Django, use the Python import path as the
:setting:`BACKEND <TASKS-BACKEND>` of the :setting:`TASKS` setting, like so::

TASKS = {
Expand Down
14 changes: 14 additions & 0 deletions tests/forms_tests/field_tests/test_urlfield.py
Original file line number Diff line number Diff line change
Expand Up @@ -209,6 +209,20 @@ def test_urlfield_assume_scheme_when_colons(self):
with self.subTest(value=value):
self.assertEqual(f.clean(value), expected)

def test_urlfield_non_hierarchical_schemes_unchanged_in_to_python(self):
f = URLField()
tests = [
"mailto:test@example.com",
"mailto:test@example.com?subject=Hello",
"tel:+1-800-555-0100",
"tel:555-0100",
"urn:isbn:0-486-27557-4",
"urn:ietf:rfc:2648",
]
for value in tests:
with self.subTest(value=value):
self.assertEqual(f.to_python(value), value)

def test_custom_validator_longer_max_length(self):

class CustomLongURLValidator(URLValidator):
Expand Down