Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
La Quadrature du Net
rpteam
Revue de Press
Commits
9fdbf4bd
Commit
9fdbf4bd
authored
May 21, 2017
by
cynddl
Browse files
Add initial authentication for the API using tokens
parent
2b3548f8
Pipeline
#1056
passed with stages
in 3 minutes and 9 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
project/settings/api.py
View file @
9fdbf4bd
...
...
@@ -9,5 +9,11 @@ REST_FRAMEWORK = {
"DEFAULT_PERMISSION_CLASSES"
:
(
"rest_framework.permissions.IsAuthenticated"
,
),
'DEFAULT_AUTHENTICATION_CLASSES'
:
(
'rest_framework.authentication.BasicAuthentication'
,
'rest_framework.authentication.SessionAuthentication'
,
'rest_framework.authentication.TokenAuthentication'
,
)
}
project/settings/apps.py
View file @
9fdbf4bd
...
...
@@ -17,9 +17,9 @@ DJANGO_APPS = [
CONTRIB_APPS
=
[
"django_extensions"
,
# http://django-extensions.readthedocs.io/
"rest_framework"
,
# http://www.django-rest-framework.org/
"rest_framework.authtoken"
,
"django_und"
,
# https://github.com/luxcem/django_und
# https://github.com/philipn/django-rest-framework-filters
# "rest_framework_filters",
"taggit"
,
"crispy_forms"
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment