Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Open sidebar
MOOC packages by hacklab
django-courses
Commits
0bb3c9bd
Commit
0bb3c9bd
authored
Apr 13, 2020
by
Fernando Ribeiro
Browse files
Refat: Change Meta position in Model
parent
b7b69550
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
courses/models.py
courses/models.py
+4
-4
No files found.
courses/models.py
View file @
0bb3c9bd
...
...
@@ -739,6 +739,10 @@ class Lesson(PositionedModel):
)
collection_name
=
'course'
class
Meta
:
verbose_name
=
_
(
'Lesson'
)
verbose_name_plural
=
_
(
'Lessons'
)
ordering
=
[
'position'
]
@
property
def
is_course_last_lesson
(
self
):
...
...
@@ -746,10 +750,6 @@ class Lesson(PositionedModel):
return
len
(
lessons
)
>
0
and
self
==
lessons
[
-
1
]
class
Meta
:
verbose_name
=
_
(
'Lesson'
)
verbose_name_plural
=
_
(
'Lessons'
)
ordering
=
[
'position'
]
def
__str__
(
self
):
return
self
.
name
...
...
Write
Preview
Markdown
is supported
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