Django apps - a single app

A single app leverages python's native modules over anything that Django adds on top. Here you might call the app something like core and you would start with a single file for each aspect of the app (eg models.py, views.py etc). Then as the app expands you would refactor these into a directory with an __init__.py and separate files as required. For example:

- models/
  - __init__.py
  - user_profiles.py
  - order.py
- views/
  - __init__.py

Having a single app does keep the project layout simple and clean. The key is ensuring your files don't get overwhelming in size and breaking them down as they grow in size. One issue you might run into is managing migration files since you ideally want a linear history, but you will more likely run into migration branches/conflicts during development.

Tomorrow we will look at multiple apps.

Also a small pat on the back as this marks 100 blog posts this year!