use convenience imports whenever possible

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