O'Reilly logo

Test-Driven Development with Django by Kevin Harvey

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Starting the project

Once you've got a Python environment set up, the next step is to create and move into a directory to start your project:

$ mkdir jmad-project
$ cd jmad-project

Now install Django and start a project called jmad:

$ pip install django
Downloading/unpacking django
  Downloading Django-1.8.1-py2.py3-none-any.whl (6.2MB): 6.2MB downloaded
Installing collected packages: django
Successfully installed django
Cleaning up...
$ django-admin.py startproject jmad

To make sure we have got everything set up correctly, let's move into the project folder and try running tests:

$ cd jmad
$ python manage.py test
Creating test database for alias 'default'...

---------------------------------------------------------------------
Ran 0 tests in 0.000s ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required