-
Notifications
You must be signed in to change notification settings - Fork 161
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Améliore les commentaires de zds.tutorialv2.models.models_versioned #4665
Conversation
03ee507
to
a67f75c
Compare
if len(base) > max_slug_size - 1 - max_suffix_digit_count: | ||
# There is a `- 1` because of the dash between the slug | ||
# itself and the numeric suffix. | ||
base = base[:max_slug_size] - 1 - max_suffix_digit_count |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
<3
|
||
def add_slug_to_pool(self, slug): | ||
"""Add a slug to the slug pool to be taken into account when generate a unique slug | ||
def __add_slug_to_pool(self, slug): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1
@@ -715,13 +724,6 @@ def traverse(self, only_container=True): | |||
elif not only_container: | |||
yield child | |||
|
|||
def is_part(self): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
zds/tutorialv2/tests/tests_models.py
Outdated
@@ -72,6 +72,14 @@ def test_workflow_content(self): | |||
self.assertTrue(self.part1.slug in versioned.children_dict.keys()) | |||
self.assertTrue(self.chapter1.slug in versioned.children_dict[self.part1.slug].children_dict) | |||
|
|||
def test_slug_pool(self): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1
c9094d9
to
53589f5
Compare
53589f5
to
b423aa5
Compare
b423aa5
to
b7eb32a
Compare
b7eb32a
to
44bfd90
Compare
44bfd90
to
7dd7d7c
Compare
Ça me semble mieux mais ça peut contenir des fautes. Relisez attentivement, je n’ai pas un anglais parfait. Améliore légèrement quelque parties du code, au niveau de la génération des slugs notamment.
7dd7d7c
to
fbe4415
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
La relecture est OK pour moi, et étant donné la réussite du check Travis, je pense qu'on peut y aller !
Ça me semble mieux mais ça peut contenir des fautes. Relisez
attentivement, je n’ai pas un anglais parfait.
Améliore légèrement quelque parties du code, au niveau de la
génération des slugs notamment.
Numéro du ticket concerné (optionnel) : aucun
Contrôle qualité
Relisez.