django runserver code example

Example 1: starting server in django

# to start a django server cd to dir with manage.py file and type following
python manage.py runserver

Example 2: django create app

python manage.py startapp # name of the app

Example 3: django create app command

python manage.py startapp app_name

Example 4: python django shell command

$ python manage.py shell
...
>>> execfile('myscript.py')

Example 5: django runserver

python manage.py runserver

Example 6: create new django project

django-admin startproject mysite