Merge pull request #3 from HackSoftware/cookiecutter-section

Add section about cookiecutter
This commit is contained in:
Radoslav Georgiev 2018-08-19 15:25:38 +03:00 committed by GitHub
commit fa01d87bda
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -47,6 +47,18 @@ Expect often updates as we discuss & decide upon different things.
* If the model property spans multiple relations, it should better be a selector.
* If a model property, added to some list API, will cause `N + 1` problem that cannot be easily solved with `select_related`, it should better be a selector.
## Cookie Cutter
We recommend starting every new project with [`cookiecutter-django`](https://github.com/pydanny/cookiecutter-django)
Once this is done, depending on the context, remove everything that's not needed.
The usual list is:
* `allauth`
* templates
* Settings for things that are not yet required (always add settings when necessary)
## Models
Lets take a look at an example model: