Minimal sample application to start developing your web project immediately on Django framework.
Switch branches/tags
Nothing to show
Clone or download


django-sample-app is a minimal sample application to start developing your web project immediately on Django framework.

The sample application comes with:

that are glued together with initializr. And its current requirements.txt file is:



1. virtualenv / virtualenvwrapper

You should already know what is virtualenv, preferably virtualenvwrapper at this stage. So, simply create it for your own project, where projectname is the name of your project:

$ mkvirtualenv --clear projectname

2. Download

Now, you need the django-sample-app project files in your workspace:

$ cd /path/to/your/workspace
$ git clone git:// projectname && cd projectname

3. Requirements

Right there, you will find the requirements.txt file that has all the great debugging tools, django helpers and some other cool stuff. To install them, simply type:

$ pip install -r requirements.txt

4. Tweaks

projectname/ file is necessary for WSGI gateways (such as uWSGI) to run your Django application and also required from Django itself. You definitely want to change {{ project_name }} value in this file to whatever you name your application (e.g. bookstore.settings).


Go to, create your secret key, copy it. Open your projectname/settings/, find SECRET_KEY line, paste your secret key.

Other settings stuff

It is good idea to make a find & replace within this default settings file as there are some "{{ project_name }}" string left such as ROOT_URLCONF or LOCAL_APPS variables.

Main URL root

You also have to config your application URLs, specific to your own needs. For the beginning, the sample app has only one view that you need to modify its namespace from projectname/, where it imports HomeView. (development specific) settings file

Copy projectname/settings/ as into the same directory and modify necessary changes. is always ignored by .gitignore, so this is the machine specific settings mostly for development purposes.

Initialize the database

First set the database engine (PostgreSQL, MySQL, etc..) in your settings files; projectname/settings/ and/or projectname/settings/ Of course, remember to install necessary database driver for your engine. Then define your credentials as well. Time to finish it up:

./ migrate

Ready? Go!

./ runserver


./ runserver_plus (Requires Werkzeug)