Answer the question
In order to leave comments, you need to log in
What is the best way to split a Django project into applications?
Hello! As part of an educational project, I need to implement a portfolio website. There were doubts about how to properly break the project into applications.
An application has been implemented that allows you to work with your account: authorization, password recovery, registration.
The following model is planned: user --(oto)-> portfolio_list --(otm)-> portfolio --(otm)-> item
The main page with portfolio and user search is planned, as well as functionality responsible for the portfolio, in addition to working with accounts .
How to split a project? The first thing that came to mind: homepage, account, portfolio. Some points are confusing here:
0. portfolio can only be created under an authorized account, so isn't it part of an account?
1. What to do with the model? All three applications will use the proposed scheme, however, the implementation will lie in any one application. Or is it possible to somehow implement models by connecting them with others that lie in other applications?
Answer the question
In order to leave comments, you need to log in
There is no need to separate the homepage into a separate application. There is always a project root, which is sufficient for this functionality.
The fact that a portfolio can only be created from an authorized account does not make it part of the application responsible for authorization.
Models for each application should be different. Communications between applications are normal.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question