Django

1 min. read

Django

https://www.djangoproject.com/

Uses python
Is not a webserver, it runs on Apache or NGINX

PIP - python installer of packages… same as npm
pip –version

Install PIP
Mac: brew install python

Upgrade pip
pip install –upgrade pip

List all packages and versions
pip freeze

Install Django
Sudo pip install django==1.8

Django version
django-admin –version

Creating a project
django-admin startproject PROJECT_NAME

python manage.py

Start server
python manage.py runserver 0.0.0.0:8080

Wsgi.py - Webserver uses this to run the project

Project
App1 - blog
App2 - wiki
App3 - static

Pieces of an App

Create an app
python manage.py startapp APP_NAME

Settings
INSTALLED_APPS
Adding or removing apps from the project