31👍
My try with Facebook:
facebook
users
messages
notifications
posts
...
Basically the gist is that an app represents a specific part of your whole project. Moreover, the app can be “pluggable” into a similar project. In order to be maintainable an app should have it’s own objectives that differ from the objectives of other apps.
In the excellent “Two Scoops of Django” book, the authors quote James Bennett:
The art of creating and maintaining a good Django app is that it
should follow the truncated Unix philosophy according to Douglas
McIlroy: “Write programs that do one thing and do it well”.
Again the authors state:
In essence, each app should be tightly focused on its task. If an app
can’t be explained in a single sentence of moderate length, or you
need to say ‘and’ more than once, it probably means the app is too big
and should be broken up.
Update 19/12/2014:
With Django 1.7 this description of “Projects and applications” is definitely worth reading.
Update 21/12/2017:
Django 1.10 link here.
1👍
from the tutorial in the docs:
Projects vs. apps
What’s the difference between a project and an app? An app is a Web application that does something – e.g., a Weblog system, a database of public records or a simple poll app. A project is a collection of configuration and apps for a particular Web site. A project can contain multiple apps. An app can be in multiple projects.
https://docs.djangoproject.com/en/dev/intro/tutorial01/#creating-models
If you compared it to youtube the whole youtube site could be one big project, with functionality divided in apps such as the video search, messaging, profile/channel creation…if the structure is simpler you can keep different parts in one place, that’s up to you. I prefer to only start splitting stuff up down the road.
- [Django]-Dropdown in Django Model
- [Django]-Prevent django admin from running SELECT COUNT(*) on the list form
- [Django]-Django: Detect database backend
0👍
In the official Django documentation:
1) An application is a web application that does something, for example, a blog system
2) A project is a collection of configuration and applications for a particular web site
3) A project can contain multiple applications. An application can be in multiple projects.
- [Django]-Postgresql DROP TABLE doesn't work
- [Django]-Django – run a function every x seconds
- [Django]-Django: CSRF token missing or incorrect
0👍
An application can be anything that can do some specific task in website. Ex:Banking domain -> Loan application, credit/debit card application etc.
A project is a collection of applications for a particular web site. Ex: Banking software, Gmail, Facebook etc.
Refer : https://consideratecode.com/2017/12/29/django-app-project-site/
- [Django]-Django REST Framework custom fields validation
- [Django]-How to return HTTP 400 response in Django?
- [Django]-Multiple Models in Django Rest Framework?