django.conf.urls.url() - Use
re_path() from django.urls, which takes the same regular expressions, or path(). ugettext(), ugettext_lazy() and the other u translation functions - Use
gettext(), gettext_lazy(), gettext_noop(), ngettext() and ngettext_lazy(). force_text() or smart_text() - Use
force_str() and smart_str(). urlquote() and the related helpers in django.utils.http - Use
quote(), quote_plus(), unquote() and unquote_plus() from urllib.parse. is_safe_url() - Use
url_has_allowed_host_and_scheme() from django.utils.http. request.is_ajax() - Check the header yourself, as in
request.headers.get('x-requested-with') == 'XMLHttpRequest', or check what the client accepts. NullBooleanField in a model - Use
BooleanField(null=True). Old migrations can keep the old field. JSONField from django.contrib.postgres - Use
models.JSONField and forms.JSONField, which work on every supported database. Old migrations can keep the old field. {% ifequal %} or {% ifnotequal %} - Use
{% if a == b %} and {% if a != b %}. PASSWORD_RESET_TIMEOUT_DAYS setting (changes behaviour) - Django ignores it, so reset links fall back to the default of three days. Set
PASSWORD_RESET_TIMEOUT in seconds instead. CSRF_TRUSTED_ORIGINS entries without a scheme - Write each origin with its scheme, as in
'https://example.com', and 'https://*.example.com' in place of '.example.com'. Without it, a system check stops the project. Signal(providing_args=...) - Remove the argument, and describe the arguments in a comment or docstring instead.
get_random_string() without a length - Pass the length, as in
get_random_string(32).