Build a Rest API with the Django REST Framework and Python 3.6
This is a rapid-fire guide on covering the basics to build a REST API with Django & Python. For much deeper depth, check out our new course on REST API: ([ Ссылка ]) ([ Ссылка ])
Software
Django 1.11.8 ([ Ссылка ])
Python 3.6.3 ([ Ссылка ])
Django Rest Framework 3.7.3 ([ Ссылка ])
Django Rest Framework JWT 1.11.0 ([ Ссылка ])
Related Source Code: [ Ссылка ]
Initial Setup
```
virtualenv -p python3 restapi-basics
# activate it
# mac: `source bin/activate`
# windows: `.\Scripts\activate`
pip install django==1.11.8 djangorestframework==3.7.3 djangorestframework-jwt==1.11.0
mkdir src && cd src
django-admin startproject cfehome .
django-admin startapp postings
```
Update your settings to reflect the following:
INSTALLED_APPS = [
...
'rest_framework',
'postings'
]
'''
REST_FRAMEWORK = {
'DEFAULT_PERMISSION_CLASSES': (
'rest_framework.permissions.IsAuthenticated',
),
'DEFAULT_AUTHENTICATION_CLASSES': (
'rest_framework_jwt.authentication.JSONWebTokenAuthentication',
'rest_framework.authentication.SessionAuthentication',
'rest_framework.authentication.BasicAuthentication',
),
}
'''
#
-----
Amazing Starts Small. Learn to build great products with code.
Enroll: [ Ссылка ] or Subscribe: [ Ссылка ]
-----
Questions? [ Ссылка ]
Suggestions? [ Ссылка ]
All of my step by step projects: [ Ссылка ]
My equipment:
Laptop: [ Ссылка ]
4k Camera: [ Ссылка ]
Drone/Aerial Video: [ Ссылка ]
Flexible/Travel Tripod for DSLR: [ Ссылка ] (I highly recommend this too: [ Ссылка ])
General Purpose Tripod: [ Ссылка ]
Webcam: [ Ссылка ]
Camera Mic: [ Ссылка ]
Studio Mic: [ Ссылка ]
Mic Arm (for Studio): [ Ссылка ]
Shock Mount (for Studio): [ Ссылка ]
Phone: [ Ссылка ]
Tablet (and portable external monitor) : [ Ссылка ]
External Hard drives: [ Ссылка ]
Headphones (mic used for travel recording): [ Ссылка ]
Build a Rest API with the Django REST Framework
Теги
djangourlshortcfe2017django 1.11 tutorialdjango tutorialinstall django on macinstall django with pipinstall django with virtualenvvirtualenvpython djangoDjango Web Framework (Software)Python (Software)web application developmentlearn djangoinstalling django on macpippython packagedjangokickstarter fundeddjangorestframeworkdjango rest frameworkrest api