use convenience imports whenever possible

This page is not yet available in Spanish. We are working on its translation.
If you have any questions or feedback about our current translation project, feel free to reach out to us!

Metadata

ID: python-django/use-convenience-imports

Language: Python

Severity: Notice

Category: Code Style

Description

Use convenient imports from Django whenever possible.

Non-Compliant Code Examples

from django.views.generic.base import View  # use django.views

Compliant Code Examples

from django.views import View
https://static.datadoghq.com/static/images/logos/github_avatar.svg https://static.datadoghq.com/static/images/logos/vscode_avatar.svg jetbrains

Seamless integrations. Try Datadog Code Analysis

PREVIEWING: mervebolat/span-id-preprocessing