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
Rolf Erik Sesseng Aas
tdt4242-base
Commits
50905285
Commit
50905285
authored
Apr 19, 2021
by
KreizerHgz
Browse files
CD 60 refactored (dupe import)
parent
88a2046e
Changes
1
Hide whitespace changes
Inline
Side-by-side
backend/secfit/diets/views.py
View file @
50905285
"""Contains views for the diets application. These are mostly class-based views.
"""
from
rest_framework
import
generics
,
mixins
from
rest_framework
import
permissions
from
rest_framework
import
generics
,
mixins
,
permissions
,
filters
from
rest_framework.parsers
import
(
JSONParser
,
...
...
@@ -10,7 +9,6 @@ from rest_framework.decorators import api_view
from
rest_framework.response
import
Response
from
rest_framework.reverse
import
reverse
from
django.db.models
import
Q
from
rest_framework
import
filters
from
diets.parsers
import
MultipartJsonParser
from
diets.permissions
import
(
IsOwner
,
...
...
@@ -33,7 +31,8 @@ from rest_framework_simplejwt.tokens import RefreshToken
from
rest_framework.response
import
Response
import
json
from
collections
import
namedtuple
import
base64
,
pickle
import
base64
import
pickle
from
django.core.signing
import
Signer
from
rest_framework.filters
import
OrderingFilter
...
...
@@ -317,7 +316,6 @@ class DietInstanceList(
return
qs
class
DietInstanceDetail
(
mixins
.
RetrieveModelMixin
,
mixins
.
UpdateModelMixin
,
...
...
@@ -406,4 +404,3 @@ class DietFileDetail(
def
delete
(
self
,
request
,
*
args
,
**
kwargs
):
return
self
.
destroy
(
request
,
*
args
,
**
kwargs
)
Write
Preview
Supports
Markdown
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