Skip to content

armgit / wger

Public Imported from GitHub
0

Self hosted FLOSS fitness/workout, nutrition and weight tracker

Increase author field max length to 60

Roland Geider41caeb9a5283
diff --git a/wger/exercises/migrations/0022_alter_exercise_license_author_and_more.py b/wger/exercises/migrations/0022_alter_exercise_license_author_and_more.py
new file mode 100644
index 000000000..fdcf81317
--- /dev/null
+++ b/wger/exercises/migrations/0022_alter_exercise_license_author_and_more.py
@@ -0,0 +1,53 @@
+# Generated by Django 4.1.5 on 2023-02-05 11:17
+
+from django.db import migrations, models
+
+
+class Migration(migrations.Migration):
+
+ dependencies = [
+ ('exercises', '0021_deletionlog'),
+ ]
+
+ operations = [
+ migrations.AlterField(
+ model_name='exercise',
+ name='license_author',
+ field=models.CharField(blank=True, help_text='If you are not the author, enter the name or source here. This is needed for some licenses e.g. the CC-BY-SA.', max_length=60, null=True, verbose_name='Author'),
+ ),
+ migrations.AlterField(
+ model_name='exercisebase',
+ name='license_author',
+ field=models.CharField(blank=True, help_text='If you are not the author, enter the name or source here. This is needed for some licenses e.g. the CC-BY-SA.', max_length=60, null=True, verbose_name='Author'),
+ ),
+ migrations.AlterField(
+ model_name='exerciseimage',
+ name='license_author',
+ field=models.CharField(blank=True, help_text='If you are not the author, enter the name or source here. This is needed for some licenses e.g. the CC-BY-SA.', max_length=60, null=True, verbose_name='Author'),
+ ),
+ migrations.AlterField(
+ model_name='exercisevideo',
+ name='license_author',
+ field=models.CharField(blank=True, help_text='If you are not the author, enter the name or source here. This is needed for some licenses e.g. the CC-BY-SA.', max_length=60, null=True, verbose_name='Author'),
+ ),
+ migrations.AlterField(
+ model_name='historicalexercise',
+ name='license_author',
+ field=models.CharField(blank=True, help_text='If you are not the author, enter the name or source here. This is needed for some licenses e.g. the CC-BY-SA.', max_length=60, null=True, verbose_name='Author'),
+ ),
+ migrations.AlterField(
+ model_name='historicalexercisebase',
+ name='license_author',
+ field=models.CharField(blank=True, help_text='If you are not the author, enter the name or source here. This is needed for some licenses e.g. the CC-BY-SA.', max_length=60, null=True, verbose_name='Author'),
+ ),
+ migrations.AlterField(
+ model_name='historicalexerciseimage',
+ name='license_author',
+ field=models.CharField(blank=True, help_text='If you are not the author, enter the name or source here. This is needed for some licenses e.g. the CC-BY-SA.', max_length=60, null=True, verbose_name='Author'),
+ ),
+ migrations.AlterField(
+ model_name='historicalexercisevideo',
+ name='license_author',
+ field=models.CharField(blank=True, help_text='If you are not the author, enter the name or source here. This is needed for some licenses e.g. the CC-BY-SA.', max_length=60, null=True, verbose_name='Author'),
+ ),
+ ]
diff --git a/wger/nutrition/migrations/0012_alter_ingredient_license_author.py b/wger/nutrition/migrations/0012_alter_ingredient_license_author.py
new file mode 100644
index 000000000..745d9665c
--- /dev/null
+++ b/wger/nutrition/migrations/0012_alter_ingredient_license_author.py
@@ -0,0 +1,18 @@
+# Generated by Django 4.1.5 on 2023-02-05 11:17
+
+from django.db import migrations, models
+
+
+class Migration(migrations.Migration):
+
+ dependencies = [
+ ('nutrition', '0011_alter_logitem_datetime'),
+ ]
+
+ operations = [
+ migrations.AlterField(
+ model_name='ingredient',
+ name='license_author',
+ field=models.CharField(blank=True, help_text='If you are not the author, enter the name or source here. This is needed for some licenses e.g. the CC-BY-SA.', max_length=60, null=True, verbose_name='Author'),
+ ),
+ ]
diff --git a/wger/utils/models.py b/wger/utils/models.py
index 3b4806134..09b8af594 100644
--- a/wger/utils/models.py
+++ b/wger/utils/models.py
@@ -22,7 +22,6 @@ from django.utils.translation import gettext_lazy as _
from wger.core.models import License
from wger.utils.constants import DEFAULT_LICENSE_ID
-
"""
Abstract model classes
"""
@@ -46,7 +45,7 @@ class AbstractLicenseModel(models.Model):
license_author = models.CharField(
verbose_name=_('Author'),
- max_length=50,
+ max_length=60,
blank=True,
null=True,
help_text=_(