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
Håvard Farestveit
tdt4242-base
Commits
f7252e98
Commit
f7252e98
authored
Apr 13, 2021
by
Elias Sagmo Larsen
Browse files
pylint/unusedimport&toolongline
parent
0fc87444
Pipeline
#127142
passed with stage
in 34 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
backend/secfit/comments/views.py
View file @
f7252e98
from
rest_framework
import
generics
,
mixins
from
rest_framework
import
permissions
from
rest_framework.filters
import
OrderingFilter
from
django.db.models
import
Q
from
comments.models
import
Comment
,
Like
from
comments.permissions
import
IsCommentVisibleToUser
from
comments.serializers
import
CommentSerializer
...
...
@@ -42,7 +41,9 @@ class CommentList(
if
workout_pk
:
queryset
=
Comment
.
objects
.
filter
(
workout
=
workout_pk
)
elif
self
.
request
.
user
:
queryset
=
Comment
.
objects
.
filter
(
IsCommentVisibleToUser
.
has_object_permission
).
distinct
()
queryset
=
Comment
.
objects
.
filter
(
IsCommentVisibleToUser
.
has_object_permission
).
distinct
()
return
queryset
...
...
backend/secfit/facilities/migrations/0004_auto_20210407_1951.py
0 → 100644
View file @
f7252e98
# Generated by Django 3.1 on 2021-04-07 17:51
from
django.db
import
migrations
,
models
class
Migration
(
migrations
.
Migration
):
dependencies
=
[
(
'facilities'
,
'0003_auto_20210308_1733'
),
]
operations
=
[
migrations
.
AlterField
(
model_name
=
'facility'
,
name
=
'image2'
,
field
=
models
.
CharField
(
blank
=
True
,
max_length
=
2048
),
),
migrations
.
AlterField
(
model_name
=
'facility'
,
name
=
'image3'
,
field
=
models
.
CharField
(
blank
=
True
,
max_length
=
2048
),
),
migrations
.
AlterField
(
model_name
=
'facility'
,
name
=
'image4'
,
field
=
models
.
CharField
(
blank
=
True
,
max_length
=
2048
),
),
migrations
.
AlterField
(
model_name
=
'facility'
,
name
=
'image5'
,
field
=
models
.
CharField
(
blank
=
True
,
max_length
=
2048
),
),
]
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