Django: How to handle imports in a reusable app
- by facha
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.