krisfields / django-baker

Adds a management command that generates views, forms, urls, admin, and templates based off the contents of models.py
BSD 3-Clause "New" or "Revised" License
389 stars 51 forks source link

init should use absolute imports to be compatible with Python 3+ #18

Open matthewslaney opened 6 years ago

matthewslaney commented 6 years ago

From Python 3+, absolute imports are the default. This breaks the behavior of the views init.py since it uses relative imports.

It just needs to change the way it generates the init.py file from:

from myview_views import * #NOQA

to:

from .myview_view import * #NOQA

I'll try to write a pull request for this later.