twoscoops / two-scoops-of-django-1.8

Tracking thoughts and feature requests for Two Scoops of Django 1.8 in the issue tracker. And the book's code examples are here.
400 stars 81 forks source link

Relative . imports across apps within project and small projects #39

Closed 0x0c72 closed 8 years ago

0x0c72 commented 9 years ago

It would be helpful to explain a bit more in depth about relative import paths. For example if you have a project that is very small and just a few semi-static pages and has no separate apps whatsoever. How you could import the views/models into settings without an app. As the from .views import X doesnt work then. I personally was a little confused at that section even with larger projects with multiple apps. You do explain why absolutes are bad, but I often times have trouble with relative dot imports and some troubleshooting tips would help a lot too.

Thanks, you guys (and gal) do a wonderful job.