Getting started
Okay, we're ready to get coding.To get started, let's create a new project to work with.
cd ~
django-admin startproject tutorial
cd tutorial
Once that's done we can create an app that we'll use to create a simple Web API.
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:
INSTALLED_APPS = [
...
'rest_framework',
'snippets.apps.SnippetsConfig',
]
Okay, we're ready to roll.
当前内容版权归 Django REST 或其关联方所有,如需对内容或内容相关联开源项目进行关注与资助,请访问 Django REST .