Skip to content

Commit

Permalink
Fix #3397 : corriges les incoherences du modele PublishableContent (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
gustavi authored and GerardPaligot committed Jun 17, 2016
1 parent a902374 commit bfa2d76
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 6 deletions.
29 changes: 29 additions & 0 deletions zds/tutorialv2/migrations/0014_auto_20160331_0415.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# -*- coding: utf-8 -*-
from __future__ import unicode_literals

from django.db import migrations, models


class Migration(migrations.Migration):

dependencies = [
('tutorialv2', '0013_auto_20160320_0908'),
]

operations = [
migrations.AlterField(
model_name='publishablecontent',
name='beta_topic',
field=models.ForeignKey(default=None, blank=True, to='forum.Topic', null=True, verbose_name=b'Sujet beta associ\xc3\xa9'),
),
migrations.AlterField(
model_name='publishablecontent',
name='helps',
field=models.ManyToManyField(to='utils.HelpWriting', db_index=True, verbose_name=b'Aides', blank=True),
),
migrations.AlterField(
model_name='publishablecontent',
name='source',
field=models.CharField(max_length=200, null=True, verbose_name=b'Source', blank=True),
),
]
9 changes: 3 additions & 6 deletions zds/tutorialv2/models/models_database.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ class Meta:
title = models.CharField('Titre', max_length=80)
slug = models.CharField('Slug', max_length=80)
description = models.CharField('Description', max_length=200)
source = models.CharField('Source', max_length=200)
source = models.CharField('Source', max_length=200, blank=True, null=True)
authors = models.ManyToManyField(User, verbose_name='Auteurs', db_index=True)
old_pk = models.IntegerField(db_index=True, default=0)
subcategory = models.ManyToManyField(SubCategory,
Expand Down Expand Up @@ -93,17 +93,14 @@ class Meta:
blank=True, null=True, max_length=80, db_index=True)
sha_draft = models.CharField('Sha1 de la version de rédaction',
blank=True, null=True, max_length=80, db_index=True)
beta_topic = models.ForeignKey(Topic,
verbose_name='Contenu associé',
default=None,
null=True)
beta_topic = models.ForeignKey(Topic, verbose_name='Sujet beta associé', default=None, blank=True, null=True)
licence = models.ForeignKey(Licence,
verbose_name='Licence',
blank=True, null=True, db_index=True)
# as of ZEP 12 this field is no longer the size but the type of content (article/tutorial)
type = models.CharField(max_length=10, choices=TYPE_CHOICES, db_index=True)
# zep03 field
helps = models.ManyToManyField(HelpWriting, verbose_name='Aides', db_index=True)
helps = models.ManyToManyField(HelpWriting, verbose_name='Aides', blank=True, db_index=True)

relative_images_path = models.CharField(
'chemin relatif images',
Expand Down

0 comments on commit bfa2d76

Please sign in to comment.