Skip to content

Instantly share code, notes, and snippets.

View jechav's full-sized avatar
🏠
Working from home

Jose Echavez M jechav

🏠
Working from home
View GitHub Profile
@jechav
jechav / info.md
Created July 31, 2017 03:57 — forked from marteinn/info.md
Using the Fetch Api with Django Rest Framework

Using the Fetch Api with Django Rest Framework

Server

First, make sure you use the SessionAuthentication in Django. Put this in your settings.py

# Django rest framework
REST_FRAMEWORK = {
    'DEFAULT_AUTHENTICATION_CLASSES': [
 'rest_framework.authentication.SessionAuthentication'