-
Notifications
You must be signed in to change notification settings - Fork 162
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
Répare le compte de caractères des contenus #4171
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
# -*- coding: utf-8 -*- | ||
from __future__ import unicode_literals | ||
|
||
from django.db import migrations, models | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
('tutorialv2', '0015_publishedcontent_nb_letter'), | ||
] | ||
|
||
operations = [ | ||
migrations.RemoveField( | ||
model_name='publishedcontent', | ||
name='nb_letter', | ||
), | ||
migrations.AddField( | ||
model_name='publishedcontent', | ||
name='char_count', | ||
field=models.IntegerField(default=None, null=True, verbose_name=b'Nombre de lettres du contenu', blank=True), | ||
), | ||
] |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -126,7 +126,7 @@ def publish_content(db_object, versioned, is_major_update=True): | |
public_version.content = db_object | ||
public_version.must_reindex = True | ||
public_version.save() | ||
public_version.nb_letter = public_version.get_nb_letters(md_file_path) | ||
public_version.char_count = public_version.get_char_count(md_file_path) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Il ne manquerais pas une migration ? J'ai checkout ta branche, il me met « no such colomn tutorialv2_publishedcontent.char_count » There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ça doit être mon installation qui à foirer. |
||
|
||
for author in db_object.authors.all(): | ||
public_version.authors.add(author) | ||
|
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.
Le problème était là : les contenus redirigés plantaient la commande.