Django Northwind is a version of the Microsoft Northwind sample database.
The Northwind database is an excellent tutorial schema for a small-business ERP, with categories, customers, region, territories, employees, shippers, suppliers, products and orders.
others using Django Northwind.
- Diagram:
- northwind/diagram/northwind_diagram.png
- Data:
- Postgres sql script
- Sample data for django
- northwind/fixtures/northwind.json
cd codesInstall the dependencies required by the Python environment. For ubuntu:
sudo apt-get install python-dev python-pipvirtualenv northwind_dbgit clone << Repository Url>>cd django_projectpip install -r requirements.txtUse the runserver to execute the application:
python manage.py runservercreate the schemas for the databases
python manage.py migratepython manage.py loaddata northwind/fixtures/northwind.jsonFor Postgres you need to install psycopg2:
pip install psycopg2==2.7.5Enter to postgres shell
Create user for Postgres
CREATE ROLE 'DATABASE_NAME' WITH LOGIN ENCRYPTED PASSWORD 'DATABASE_PASSWORD';Create database for Postgres
CREATE DATABASE 'DATABASE_NAME' WITH OWNER = DATABASE_NAME;Sample configuration for Postgres settings database
DATABASES = {
'default': {
'ENGINE': os.environ.get('DATABASE_ENGINE', 'django.db.backends.postgresql_psycopg2'),
'NAME': os.environ.get('DATABASE_NAME'),
'USER': os.environ.get('DATABASE_USER'),
'PASSWORD': os.environ.get('DATABASE_PASSWORD'),
'HOST': os.environ.get('DATABASE_HOST'),
'PORT': os.environ.get('DATABASE_PORT'),
}
}