/django-base-project

Django base project with logger and environment settings pre-configured with unit tests.

Primary LanguagePython

Django - Base Project

This simple Django project includes environment based settings and pre-configured logging following the best design patterns.


Getting started

These instructions will get you a copy of this project up and running on your machine for development and testing purposes.

System Requirements

Project dependencies

Project setup

Create a virtual environment and after activating run the following command to install required python packages:

pip install -r requirements.txt

Set environment variables required to run the project

export $(cat ./env/development.env)

Override environment variables if required

export DATABASE_URL=postgres://USER:PASSWORD@HOST:PORT/NAME
export LOGGING_LEVEL=DEBUG

Apply migrations to synchronize the database state with the current set of models and migrations.

python manage.py migrate

Collect all static files from each application

python manage.py collectstatic --no-input

Create superuser who can login to the admin site

python manage.py createsuperuser

Run the project

$ python manage.py runserver

Authors: