Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
grady
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Jan Maximilian Michal
grady
Commits
804730ce
Commit
804730ce
authored
7 years ago
by
robinwilliam.hundt
Browse files
Options
Downloads
Patches
Plain Diff
Added api-refresh-token/ endpoint
parent
5fdfa1d4
No related branches found
No related tags found
1 merge request
!16
Backend tests
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
backend/core/urls.py
+3
-2
3 additions, 2 deletions
backend/core/urls.py
backend/grady/settings/default.py
+1
-0
1 addition, 0 deletions
backend/grady/settings/default.py
backend/grady/urls.py
+2
-4
2 additions, 4 deletions
backend/grady/urls.py
with
6 additions
and
6 deletions
backend/core/urls.py
+
3
−
2
View file @
804730ce
from
django.conf.urls
import
url
from
django.conf.urls
import
url
from
django.contrib.staticfiles.urls
import
staticfiles_urlpatterns
from
django.contrib.staticfiles.urls
import
staticfiles_urlpatterns
from
rest_framework_jwt.views
import
obtain_jwt_token
from
rest_framework_jwt.views
import
obtain_jwt_token
,
refresh_jwt_token
from
core
import
views
from
core
import
views
...
@@ -9,7 +9,8 @@ urlpatterns = [
...
@@ -9,7 +9,8 @@ urlpatterns = [
url
(
r
'
^api/student/submission/(?P<pk>[0-9]+)$
'
,
views
.
SubmissionApiView
.
as_view
()),
url
(
r
'
^api/student/submission/(?P<pk>[0-9]+)$
'
,
views
.
SubmissionApiView
.
as_view
()),
url
(
r
'
^api/student/submission/(?P<pk>[0-9]+)/feedback/$
'
,
views
.
FeedbackApiView
.
as_view
()),
url
(
r
'
^api/student/submission/(?P<pk>[0-9]+)/feedback/$
'
,
views
.
FeedbackApiView
.
as_view
()),
url
(
r
'
^api-token-auth/
'
,
obtain_jwt_token
)
url
(
r
'
^api-token-auth/
'
,
obtain_jwt_token
),
url
(
r
'
api-token-refresh
'
,
refresh_jwt_token
),
]
]
urlpatterns
+=
staticfiles_urlpatterns
()
urlpatterns
+=
staticfiles_urlpatterns
()
This diff is collapsed.
Click to expand it.
backend/grady/settings/default.py
+
1
−
0
View file @
804730ce
...
@@ -159,6 +159,7 @@ REST_FRAMEWORK = {
...
@@ -159,6 +159,7 @@ REST_FRAMEWORK = {
JWT_AUTH
=
{
JWT_AUTH
=
{
'
JWT_EXPIRATION_DELTA
'
:
datetime
.
timedelta
(
seconds
=
600
),
'
JWT_EXPIRATION_DELTA
'
:
datetime
.
timedelta
(
seconds
=
600
),
'
JWT_ALLOW_REFRESH
'
:
True
,
}
}
LOGGING
=
{
LOGGING
=
{
...
...
This diff is collapsed.
Click to expand it.
backend/grady/urls.py
+
2
−
4
View file @
804730ce
...
@@ -18,10 +18,8 @@ from django.contrib import admin
...
@@ -18,10 +18,8 @@ from django.contrib import admin
urlpatterns
=
[
urlpatterns
=
[
url
(
r
'
^admin/
'
,
admin
.
site
.
urls
),
url
(
r
'
^admin/
'
,
admin
.
site
.
urls
),
url
(
r
'
^
'
,
include
(
'
core.urls
'
))
url
(
r
'
^
'
,
include
(
'
core.urls
'
)),
]
urlpatterns
+=
[
url
(
r
'
^api-auth/
'
,
include
(
'
rest_framework.urls
'
,
url
(
r
'
^api-auth/
'
,
include
(
'
rest_framework.urls
'
,
namespace
=
'
rest_framework
'
)),
namespace
=
'
rest_framework
'
)),
]
]
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment