Skip to content

Is there some way to not change the order of the import and the code before that import? #4

Description

@MisLink

Sorry for my English. The code is more obvious.

In Django I need a line django.setup() before importing django model for some scripts beyond the django project:

import django
django.setup()

from apps.model import Blah

zimports will change it to

import django
from apps.model import Blah

django.setup()

What is the right way in this situation?

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions