Suggestions for overcoming common challenges in Django projects
There are some challenges that come up in every Django project. Some of them right at the start: How do I organize my
apps? Where do I put the base template, and all the other templates? Should I do internationalization right away?
Other problems only crop up a little later: how do I manage production settings? How do I make sure permissions are
checked correctly? How do I make menus appear correctly?
Some may appear at any point in time: how do I add content pages? What code goes into models/controllers/views?
In this repository, we try to find ways to get unstuck from these challenges. Some people may call the things we do here “best practices” or “patterns” or “recipes” or “ideas” or “opinions”. These are just things we’ve found to work in these situations many times. Some of our solutions are more directly applicable, others are more guideline-style.
You can also join us on Discord or on Telegram.
Here are the things we have ideas for:
- App management and placement and settings (and urlpatterns)
- Username vs email address (WIP)
- Registration in general (WIP)
- Background tasks and long-running processes and Caching (WIP)
- Templates: Placement, folders, blocks and inheritance and namespaces
- Should you do i18n and l10n right away?
- When and how to start caching (memcached, redis etc.) (WIP)
- Where does your code go: models, views or managers or somewhere else? (WIP)
- When to use Middlewares and context processors and what are they? (WIP)
- How to secure access: security middlewares or login_required (white vs black list) (WIP)
- How to create files and store them in file models (WIP)
- What to do about image scaling and thumbnailing (and hosting)? (WIP)
- How to serve content: coded pages, flatpages or Wagtail? (WIP)
This repository also contains a project called "Django Unstuck" that adheres to the guidelines in the documentation.