A minimal cookiecutter template to generate a very simple django 1.10 project.
To generate new django project:
cookiecutter https://github.com/singleton11/SDB
Project will have the following directory structure:
<project_slug>
├── docker
│ └── nginx
│ ├── default.conf
│ └── Dockerfile
├── docker-compose.yml
├── Pipfile
├── README.rst
├── src
│ ├── apps
│ │ └── __init__.py
│ ├── config
│ │ ├── __init__.py
│ │ ├── settings
│ │ │ ├── common
│ │ │ │ ├── base.py
│ │ │ │ ├── __init__.py
│ │ │ │ ├── installed_apps.py
│ │ │ │ ├── localization.py
│ │ │ │ ├── middleware.py
│ │ │ │ ├── security.py
│ │ │ │ ├── staticfiles.py
│ │ │ │ └── templates.py
│ │ │ ├── __init__.py
│ │ │ └── local.py
│ │ ├── urls.py
│ │ └── wsgi.py
│ ├── core
│ │ ├── apps.py
│ │ └── __init__.py
│ └── manage.py
└── swagger
└── swagger.yml
Then to create virtualenv and install dependencies you have to run
pipenv install
To activate virtualenv
pipenv shell
Philosophy of the project is stay simple and easy to maintain
Now this boilerplate hasn't many useful things, but it will be added with trying to avoid to loose simplicity.
- Added core app
- Django app moved to
src/ pip-toolsreplaced topipenv- Split settings
- Added swagger
- Added
factory-boyto dependencies - Added
django-cors-headers
SECRET_KEYmoved inlocal.pybecauseSECRET_KEYhave to set up through environment variables in production and purpose of this decision to make project be not able to start without environment variable withSECRET_KEYvalue provided- Added post-generation hook to change
SECRET_KEY
- Removed redundant dependencies from common.in and local.in
- Removed docker-compose web service (because, there is better development in virtual environment)
- Removed coverage settings (because pycharm has bundled coverage tool)
- Fabric replaced by invoke
- Adjusted README.rst title '#' symbol length by project name length
- Added PyCharm configuration
- Project restructuring
- Added
pip-toolssupport - Added a few fab commands
- Added README
- Added MIT LICENSE