Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
T
tdt4242-base
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
Håvard Farestveit
tdt4242-base
Commits
c2805be2
Commit
c2805be2
authored
4 years ago
by
Elias Sagmo Larsen
Browse files
Options
Downloads
Patches
Plain Diff
pylint/urls_unusedimports
parent
526224f8
No related branches found
No related tags found
No related merge requests found
Pipeline
#127917
passed
4 years ago
Stage: test
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
backend/secfit/facilities/views.py
+9
-6
9 additions, 6 deletions
backend/secfit/facilities/views.py
with
9 additions
and
6 deletions
backend/secfit/facilities/views.py
+
9
−
6
View file @
c2805be2
"""
Contains views for the workouts application. These are mostly class-based views.
"""
from
rest_framework.response
import
Response
from
rest_framework
import
generics
,
mixins
from
rest_framework
import
permissions
from
rest_framework.decorators
import
api_view
from
rest_framework.pagination
import
PageNumberPagination
from
rest_framework.reverse
import
reverse
from
.models
import
Facility
from
rest_framework.response
import
Response
from
.serializers
import
FacilityGetSerializer
,
FacilityPostSerializer
...
...
@@ -20,7 +20,8 @@ def api_root(request, format=None):
class
FacilityGeneration
(
mixins
.
CreateModelMixin
,
generics
.
GenericAPIView
mixins
.
CreateModelMixin
,
generics
.
GenericAPIView
):
"""
Class defining the web response for creation of a facility
...
...
@@ -42,7 +43,9 @@ class StandardResultsSetPagination(PageNumberPagination):
class
FacilityList
(
mixins
.
ListModelMixin
,
mixins
.
CreateModelMixin
,
generics
.
GenericAPIView
mixins
.
ListModelMixin
,
mixins
.
CreateModelMixin
,
generics
.
GenericAPIView
):
"""
Class defining the web response for retrieval of multiple facilities
...
...
@@ -59,8 +62,8 @@ class FacilityList(
class
FacilitySingle
(
mixins
.
RetrieveModelMixin
,
generics
.
GenericAPIView
,
mixins
.
RetrieveModelMixin
,
generics
.
GenericAPIView
,
):
"""
Class defining the web response for the details of an individual Facility.
...
...
@@ -71,4 +74,4 @@ class FacilitySingle(
permission_classes
=
[
permissions
.
IsAuthenticated
]
def
get
(
self
,
request
,
*
args
,
**
kwargs
):
return
self
.
retrieve
(
request
,
*
args
,
**
kwargs
)
\ No newline at end of file
return
self
.
retrieve
(
request
,
*
args
,
**
kwargs
)
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