Thank you to all three of you.
This was exactly the advice I've been looking for, and increased my
understanding of Django as well as of my own app.
I will go carefully through the relations between my different models, and
split them up between several model files, and cross-import as needed.
Don't forget that you can also split all your model classes one each into their
own separate files. Create a models dir and put them in there.
Then in app/models/__init__.py you say ...
from .thismodel import ThisModel
from .thatmodel import ThatModel
And so on.
In any view or other file you
Hi Mikkel,
When facing this type of situation, I tend to use one of these two options,
depending on the number of model classes:
* if the number of classes is reasonable, I use a single app, but implement
the models in a model package, distributing the classes into modules inside
this pa
Hi Mikkel,
I have used Django long back, so it might not be the best solution.
Surely creating one big models.py and views.py will make your code not
scalable for future, and making small interlinked apps will also not the
best idea.
Your intermediate solution is better than both above solut
4 matches
Mail list logo