- Published on
Django project generation using cookiecutter-django
- Authors

- Name
- Manas Mallick
Cookiecutter is a command line utility to create projects from templates. cookiecutter-django is a production ready django template to help jumpstart a project.
The advantage to using this you can have your team follow the same template and this will make sure there is a level of uniformity in your organisation
For list of features, dependencies please visit github repo
Project Generation
- Install cookiecutter
pip install cookiecutter
- RUN COOKIECUTTER COMMAND LINE TO SETUP DJANGO PROJECT
cookiecutter gh:pydanny/cookiecutter-django
- WHEN PROMPTED TYPE YES OR LEAVE IT BLANK TO REPLACE ALREADY DOWNLOADED TEMPLATE
You’ve downloaded ~user/.cookiecutters/cookiecutter-django before. Is it okay to delete and re-download it? [yes]:
- ANSWER SETUP RELATED QUESTIONS TO FINALISE
project_name [My Awesome Project]: Sample Django Project
project_slug [sample_django_project]: my_first_django_project
description [Behold My Awesome Project!]: My First Django Project
author_name [Daniel Roy Greenfeld]: Manas Mallick
domain_name [example.com]: mycodehere.com
email [manas-mallick@example.com]: manas@mycodehere.com
version [0.1.0]: 0.0.1
- Next set of questions are more to choose project type, features, licenses
Select open_source_license:
1 – MIT
2 – BSD
3 – GPLv3
4 – Apache Software License 2.0
5 – Not open source
Choose from 1, 2, 3, 4, 5 [1]: 1
- Your timezone (if you miss this you could change in config/settings later)
timezone [UTC]: UTC
- Whether your runtime is in windows
windows [n]: n
- Whether you use pycharm
use_pycharm [n]: n
- Whether you use docker
use_docker [n]: n
- What version of postgres would you use
Select postgresql_version:
1 – 11.3
2 – 10.8
3 – 9.6
4 – 9.5
5 – 9.4
Choose from 1, 2, 3, 4, 5 [1]: 1
- What task runner to use to automate JavaScript or CSS compilation from TypeScript or SGSS
Select js_task_runner:
1 – None
2 – Gulp
Choose from 1, 2 [1]: 1
- Cloud provider (also used to server static files) *
Select cloud_provider:
1 – AWS
2 – GCP
3 – None
Choose from 1, 2, 3 [1]: 3
- Mail service to send emails
Select mail_service:
1 – Mailgun
2 – Amazon SES
3 – Mailjet
4 – Mandrill
5 – Postmark
6 – Sendgrid
7 – SendinBlue
8 – SparkPost
9 – Other SMTP
Choose from 1, 2, 3, 4, 5, 6, 7, 8, 9 [1]: 1
- Whether you want to use asynchronous execution (select y only if you know what you are doing)
use_async [n]: n
- Whether you want to use Django Rest Framework for WebAPI
use_drf [n]: n
- Whether you would use custom bootstrap styles
custom_bootstrap_compilation [n]: n
- To compress linked and inline JS or CSS into single cached file
use_compressor [n]: n
- Whether you require task queue, this also supports scheduling and messaging
use_celery [n]: y
- Email Testing tool for developers
use_mailhog [n]: y
- To perform error tracking (aggregates errors by details)
use_sentry [n]: y
- Whether you would use whitenoise to serve static files *
use_whitenoise [n]: n
- Cloud hosting platform
use_heroku [n]: n
- Whether you would use Continuous Integration
Select ci_tool:
1 – None
2 – Travis
3 – Gitlab
Choose from 1, 2, 3 [1]: 3
- Whether you would like to store local settings in version control system
keep_local_envs_in_vcs [y]: y
- Debug only or production
debug [n]: y
You should either use Whitenoise or select a Cloud Provider to serve static files
- PREPARE WORKSPACE AND RUNSERVER