From eeb0ae59f56a059273f7d3a03c47838a9c1b4665 Mon Sep 17 00:00:00 2001 From: renaud gaudin Date: Thu, 18 Apr 2024 16:21:10 +0000 Subject: [PATCH] Fixed #412: removed content_ fields from DB --- ...onfiguration_content_africatik_and_more.py | 45 ++++++++++++++++ manager/manager/models.py | 54 ------------------- 2 files changed, 45 insertions(+), 54 deletions(-) create mode 100644 manager/manager/migrations/0029_remove_configuration_content_africatik_and_more.py diff --git a/manager/manager/migrations/0029_remove_configuration_content_africatik_and_more.py b/manager/manager/migrations/0029_remove_configuration_content_africatik_and_more.py new file mode 100644 index 0000000..6470852 --- /dev/null +++ b/manager/manager/migrations/0029_remove_configuration_content_africatik_and_more.py @@ -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", + ), + ] diff --git a/manager/manager/models.py b/manager/manager/models.py index 07e1898..b72aaad 100644 --- a/manager/manager/models.py +++ b/manager/manager/models.py @@ -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, @@ -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, @@ -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