L
L
Larisa .•º2017-02-13 16:32:12
Django
Larisa .•º, 2017-02-13 16:32:12

Does Django allow you to create an application inside a project, second level?

There is a project, the application structure is normal, as described in the documentation:

проект:
                         проект_setting
                         static_общая
                         template_общая
                         приложение_1 - стандатрной конфигурации
                         каталог 
                                приложение_2

Tell me, is such a project structure possible, (feature of application_2), and how to access the statics of application_2?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
U
un1t, 2017-02-13
@barolina

Well, generally speaking, you can, but at the same time, you can’t.
For example, I put apps in the apps folder.
But in jang a lot requires applications to be rooted. For example, the definition of FK or an indication of the user model.
As a result, in order for this to work, I wrote in settings.py
sys.path.insert(0, os.path.join(BASE_DIR, 'apps'))

S
sim3x, 2017-02-13
@sim3x

Yes
stackoverflow.com/questions/10313475/moving-django...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question