[Django {{ django_version }}](https://docs.djangoproject.com/en/{{ docs_version }}/) project, running with Python 3.7
- Python 3.7
- Virtualenv (
pip3 install virtualenv
)
Create a Python virtual environment:
$ virtualenv -p python3.7 env
$ source env/bin/activate
For development requirements:
(env)$ pip install -r requirements-dev.txt
For production requirements:
(env)$ pip install -r requirements.txt
This project uses PostgreSQL as its database engine. For local development, the default configuration is specified in [dev.py]({{ project_name }}/conf/settings/dev.py#L5-L9)
Before starting the development server, make sure that:
- PostgreSQL is running,
- The database and its associated user (with password) exist and have the proper permissions.
For local development, you can use Django's built-in development server:
(env)$ cd {{ project_name }}/
(env)$ python manage.py runserver
Other manage.py
commands, see:
(env)$ python manage.py --help
This template is based on the project layout recommended by @pydanny and @audreyr in their "Two Scoops of Django" book, as well as my personal experience with Django so far.
This is only a lightweight Django project template layout.
If you are looking for a more comprehensive setup, check out Cookiecutter templates such as cookiecutter-django, or my own django-cookiecutter-template.
To use this template with the startproject
django admin command:
django-admin startproject \
--template https://github.com/alph0n5e/django-project-template/archive/master.zip \
--extension py,txt,md