I have a question about Django Application.

Asked 2 years ago, Updated 2 years ago, 51 views

Django created and managed more than one application in one project.

I wonder what is the criteria for creating an application and how to manage common resources (e.g. user model, base model, etc.).

django

2022-09-21 18:08

1 Answers

The application creation criteria is up to you. Haha

If you want to divide each function, you can divide it, or you can combine it into one application and implement it. But in terms of management, it would be nice to see that you divide it up and manage it

And there is a from~import~ statement for common resource usage, so you can use it.

And to use the resources of each application,

Register at mysite/settings.py and use it.

# Application definition

INSTALLED_APPS = (
    'django.contrib.admin',
    'django.contrib.auth',
    'django.contrib.contenttypes',
    'django.contrib.sessions',
    'django.contrib.messages',
    'django.contrib.staticfiles',
    'blog', #AddApplication
    'board',
)

Reference URL: https://tutorial.djangogirls.org/ko/django_models/


2022-09-21 18:08

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.