Getting started

Okay, we're ready to get coding.To get started, let's create a new project to work with.

  1. cd ~
  2. django-admin startproject tutorial
  3. cd tutorial

Once that's done we can create an app that we'll use to create a simple Web API.

  1. python manage.py startapp snippets

We'll need to add our new snippets app and the rest_framework app to INSTALLED_APPS. Let's edit the tutorial/settings.py file:

  1. INSTALLED_APPS = [
  2. ...
  3. 'rest_framework',
  4. 'snippets.apps.SnippetsConfig',
  5. ]

Okay, we're ready to roll.