-
Notifications
You must be signed in to change notification settings - Fork 160
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'dev' into passez_votre_chemin_refacto_url_en_cours
- Loading branch information
Showing
17 changed files
with
150 additions
and
90 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
from django.db import migrations, models | ||
|
||
import easy_thumbnails.fields | ||
|
||
import zds | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
("tutorialv2", "0032_event"), | ||
("utils", "0025_move_helpwriting"), | ||
] | ||
|
||
state_operations = [ | ||
migrations.CreateModel( | ||
name="HelpWriting", | ||
fields=[ | ||
("id", models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name="ID")), | ||
("title", models.CharField(max_length=20, verbose_name="Name")), | ||
("slug", models.SlugField(max_length=20)), | ||
("tablelabel", models.CharField(max_length=150, verbose_name="TableLabel")), | ||
("image", easy_thumbnails.fields.ThumbnailerImageField(upload_to=zds.utils.models.image_path_help)), | ||
], | ||
options={ | ||
"verbose_name": "Aide à la rédaction", | ||
"verbose_name_plural": "Aides à la rédaction", | ||
}, | ||
), | ||
migrations.AlterField( | ||
model_name="publishablecontent", | ||
name="helps", | ||
field=models.ManyToManyField(blank=True, db_index=True, to="tutorialv2.HelpWriting", verbose_name="Aides"), | ||
), | ||
] | ||
|
||
operations = [migrations.SeparateDatabaseAndState(state_operations=state_operations)] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
from django.db import models | ||
from easy_thumbnails.fields import ThumbnailerImageField | ||
|
||
from zds.utils import old_slugify | ||
from zds.utils.models import image_path_help | ||
|
||
|
||
class HelpWriting(models.Model): | ||
|
||
"""Tutorial Help""" | ||
|
||
class Meta: | ||
verbose_name = "Aide à la rédaction" | ||
verbose_name_plural = "Aides à la rédaction" | ||
|
||
# A name for this help | ||
title = models.CharField("Name", max_length=20, null=False) | ||
slug = models.SlugField(max_length=20) | ||
|
||
# tablelabel: Used for the accessibility "This tutoriel need help for writing" | ||
tablelabel = models.CharField("TableLabel", max_length=150, null=False) | ||
|
||
# The image to use to illustrate this role | ||
image = ThumbnailerImageField(upload_to=image_path_help) | ||
|
||
def __str__(self): | ||
"""Textual Help Form.""" | ||
return self.title | ||
|
||
def save(self, *args, **kwargs): | ||
self.slug = old_slugify(self.title) | ||
super().save(*args, **kwargs) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
from django.db import migrations | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [("utils", "0024_alter_hatrequest_is_granted")] | ||
|
||
database_operations = [migrations.AlterModelTable("HelpWriting", "tutorialv2_helpwriting")] | ||
|
||
state_operations = [migrations.DeleteModel("HelpWriting")] | ||
|
||
operations = [ | ||
migrations.SeparateDatabaseAndState(database_operations=database_operations, state_operations=state_operations) | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters