Django Basics

Creating a new Django Project

To create the project run,

python startproject

the name of the project you wish to create.

Creating a new Django App

  1. To create a new app, run
$ python startapp <appname>

name of the app you wish to create.

  1. Tell your Django project about the new app by adding it to the tuple in your INSTALLED_APPS project’s file

  2. In your project file, add a mapping to the

  3. In your app’s directory, create a file to direct incoming URL strings to views.

  4. In your app’s py, create the required views ensuring that they return a view HttpResponse object.

These writings represent my own personal views alone.
Licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.