python - What exactly are Django Apps -


I have to switch from trains to diego, to expand my mind, and a question arises in my mind.

My train app is quite messy, because my hobby based development approach is a patch and glue. I have seen very quickly that Django is split between a project and an app according to your site, a project multiple applications , And an app can be used for many apps.

This made me amazed, because it will clarify the rows between the areas of my site. I tried to find some more examples and information on it, but I could not answer my question, Which is:

How big / small is this app? Do they want to communicate close / near?

For example, is an app to deal with the profiles of smart users, and is another app for dealing with blog posts and comments of those users? (In my site, a user can have many blogs, with different profiles). Or are they meant to be used otherwise?

is a fancy name for a degeneracy app a Python package actually , That's the only thing that separates a Denggo app from other Python packages, it makes sense to appear in the INSTALLED_APPS list in settings.py Because it has things like templates, models, or other features which can be searched automatically through other DJG facilities.

A good appendix app will do only one thing, do it well, and it should not be tightly connected to any other app, so that it can be used. contrib Many types of apps are provided with the names in the namespace following this scenario.

In your example, there is a good way to create applications that the user has to be one for profile (or use one of several existing profile apps), an app for blog posts (or none of these Many who already do), an app for comments, separated from the blog post (again, you can use an existing app for this), and finally, a very small app that all three together Adds because they are different Should not be directly dependent.

Comments

Popular posts from this blog

mysql - BLOB/TEXT column 'value' used in key specification without a key length -

c# - Using Vici cool Storage with monodroid -

python - referencing a variable in another function? -