Skip to content

Commit

Permalink
Fixed #412: removed content_ fields from DB
Browse files Browse the repository at this point in the history
  • Loading branch information
rgaudin committed Apr 18, 2024
1 parent 5e01eda commit eeb0ae5
Show file tree
Hide file tree
Showing 2 changed files with 45 additions and 54 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
# Generated by Django 5.0.3 on 2024-04-18 16:19

from django.db import migrations


class Migration(migrations.Migration):

dependencies = [
("manager", "0028_configuration_beta_features_and_more"),
]

operations = [
migrations.RemoveField(
model_name="configuration",
name="content_africatik",
),
migrations.RemoveField(
model_name="configuration",
name="content_africatikmd",
),
migrations.RemoveField(
model_name="configuration",
name="content_edupi",
),
migrations.RemoveField(
model_name="configuration",
name="content_mathews",
),
migrations.RemoveField(
model_name="configuration",
name="content_nomad",
),
migrations.RemoveField(
model_name="configuration",
name="content_wikifundi_en",
),
migrations.RemoveField(
model_name="configuration",
name="content_wikifundi_es",
),
migrations.RemoveField(
model_name="configuration",
name="content_wikifundi_fr",
),
]
54 changes: 0 additions & 54 deletions manager/manager/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -832,26 +832,6 @@ class Meta:
default=list,
)

content_wikifundi_fr = models.BooleanField(
default=False,
verbose_name=_lz("WikiFundi FR"),
help_text=_lz("Wikipedia-like Editing Platform (French)"),
)
content_wikifundi_en = models.BooleanField(
default=False,
verbose_name=_lz("WikiFundi EN"),
help_text=_lz("Wikipedia-like Editing Platform (English)"),
)
content_wikifundi_es = models.BooleanField(
default=False,
verbose_name=_lz("WikiFundi ES"),
help_text=_lz("Wikipedia-like Editing Platform (Spanish)"),
)
content_edupi = models.BooleanField(
default=False,
verbose_name=_lz("File resources"),
help_text=_lz("Share arbitrary files with all users"),
)
content_edupi_resources = models.CharField(
max_length=500,
blank=True,
Expand All @@ -866,32 +846,6 @@ class Meta:
validate_fileresources_url,
],
)
content_nomad = models.BooleanField(
default=False,
verbose_name=_lz("Nomad android apps"),
help_text=_lz("Révisions du CP à la 3è"),
)
content_mathews = models.BooleanField(
default=False,
verbose_name=_lz("Math Mathews android"),
help_text=_lz("Un jeu pour réviser les maths"),
)
content_africatik = models.BooleanField(
default=False,
verbose_name=_lz("Africatik Écoles"),
help_text=_lz(
"Applications éducatives adaptées au contexte culturel africain "
+ "(version Écoles numériques)"
),
)
content_africatikmd = models.BooleanField(
default=False,
verbose_name=_lz("Africatik Maisons digitales"),
help_text=_lz(
"Applications éducatives adaptées au contexte culturel africain "
+ "(version Maisons digitales)"
),
)

content_metrics = models.BooleanField(
default=False,
Expand Down Expand Up @@ -1091,14 +1045,6 @@ def compatible_medias(self):
def min_units(self):
return self.min_media.units

@property
def wikifundi_languages(self):
return [
lang
for lang in self.WIKIFUNDI_LANGUAGES
if getattr(self, f"content_wikifundi_{lang}", False)
]

def all_languages(self):
return self._meta.get_field("language").choices

Expand Down

0 comments on commit eeb0ae5

Please sign in to comment.