Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
T
tdt4242-group16
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
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
Ole-Christian Bjerkeset
tdt4242-group16
Commits
846a70c6
Commit
846a70c6
authored
2 years ago
by
Ole-Christian Bjerkeset
Browse files
Options
Downloads
Patches
Plain Diff
Refactiring users/urls.py
parent
01ab4674
No related branches found
No related tags found
1 merge request
!7
merging refactor/gallery into master
Pipeline
#171813
passed
2 years ago
Stage: test
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
backend/secfit/users/urls.py
+36
-10
36 additions, 10 deletions
backend/secfit/users/urls.py
with
36 additions
and
10 deletions
backend/secfit/users/urls.py
+
36
−
10
View file @
846a70c6
from
django.urls
import
path
,
include
from
django.urls
import
path
from
users
import
views
from
rest_framework.urlpatterns
import
format_suffix_patterns
urlpatterns
=
[
path
(
"
api/users/
"
,
views
.
UserList
.
as_view
(),
name
=
"
user-list
"
),
path
(
"
api/users/<int:pk>/
"
,
views
.
UserDetail
.
as_view
(),
name
=
"
user-detail
"
),
path
(
"
api/profiles/<int:pk>/
"
,
views
.
ProfileUpdate
.
as_view
(),
name
=
"
profile-update
"
),
path
(
"
api/users/<str:username>/
"
,
views
.
UserDetail
.
as_view
(),
name
=
"
user-detail
"
),
path
(
"
api/offers/
"
,
views
.
OfferList
.
as_view
(),
name
=
"
offer-list
"
),
path
(
"
api/offers/<int:pk>/
"
,
views
.
OfferDetail
.
as_view
(),
name
=
"
offer-detail
"
),
path
(
"
api/athlete-files/
"
,
views
.
AthleteFileList
.
as_view
(),
name
=
"
athlete-file-list
"
# Adding all the user paths in the api
path
(
"
api/users/
"
,
views
.
UserList
.
as_view
(),
name
=
"
user-list
"
),
path
(
"
api/users/<int:pk>/
"
,
views
.
UserDetail
.
as_view
(),
name
=
"
user-detail
"
),
path
(
"
api/profiles/<int:pk>/
"
,
views
.
ProfileUpdate
.
as_view
(),
name
=
"
profile-update
"
),
path
(
"
api/users/<str:username>/
"
,
views
.
UserDetail
.
as_view
(),
name
=
"
user-detail
"
),
path
(
"
api/offers/
"
,
views
.
OfferList
.
as_view
(),
name
=
"
offer-list
"
),
path
(
"
api/offers/<int:pk>/
"
,
views
.
OfferDetail
.
as_view
(),
name
=
"
offer-detail
"
),
path
(
"
api/athlete-files/
"
,
views
.
AthleteFileList
.
as_view
(),
name
=
"
athlete-file-list
"
),
path
(
"
api/athlete-files/<int:pk>/
"
,
...
...
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