Python / Django basic setup for Centos 7

Python and Django initial setup

Centos 7 Python Django

sudo yum -y update
sudo reboot
sudo yum -y install python-pip
sudo yum -y install virtualenv
mkdir <projects>
cd <projects>
virtual env
source env/bin/activate
pip install django==1.8.17

Creating a Sample Project

django-admin startproject <projectname> cd <projectname>

Migrate Project

do this right after the django-admin process

python migrate

Create superuser

Create superuser for admin site

python createsuperuser

You will be prompted for a username, email address and password

Starting Django dev server

Start the server.
Make sure you allow the port through the firewall

python runserver

This sets up the web site on all ips for that host on port 8000\\
Admin site is http://sitename:8000/admin \\

Create an app

python startapp [app_label]

Now you can Create Home Page for Django App

Django admin site



how to install the django web framework on centos-7