Django: How to handle imports in a reusable app

Posted by facha on Stack Overflow See other posts from Stack Overflow or by facha
Published on 2010-03-22T15:13:26Z Indexed on 2011/11/25 9:50 UTC
Read the original article Hit count: 235

Filed under:

everyone I'm just starting with django. It is not quite clear to me, how should I write an app I could reuse later. In every tutorial I read I see the same piece of code:

view.py
from project.app.models import MyModel

So, if I move my apps to another project, I'll have to modify the "project.app.models" so that it looks like "project2.app.models" for every app I move. Is there a way to avoid that?

Thanks in advance.

© Stack Overflow or respective owner

Related posts about django