Skip to content

armgit / wger

Public Imported from GitHub
0

Self hosted FLOSS fitness/workout, nutrition and weight tracker

Increase field lengths for license information

Roland Geiderf6abd4f7f99c
diff --git a/wger/exercises/migrations/0027_alter_deletionlog_replaced_by_and_more.py b/wger/exercises/migrations/0027_alter_deletionlog_replaced_by_and_more.py
new file mode 100644
index 000000000..28083b3a8
--- /dev/null
+++ b/wger/exercises/migrations/0027_alter_deletionlog_replaced_by_and_more.py
@@ -0,0 +1,344 @@
+# Generated by Django 4.2.6 on 2023-11-23 19:46
+
+from django.db import migrations, models
+
+
+class Migration(migrations.Migration):
+ dependencies = [
+ ('exercises', '0026_deletionlog_replaced_by'),
+ ]
+
+ operations = [
+ migrations.AlterField(
+ model_name='deletionlog',
+ name='replaced_by',
+ field=models.UUIDField(
+ default=None,
+ editable=False,
+ help_text=
+ 'UUID of the object replaced by the deleted one. At the moment only available for exercise bases',
+ null=True,
+ verbose_name='Replaced by'
+ ),
+ ),
+ 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.',
+ max_length=600,
+ null=True,
+ verbose_name='Author(s)'
+ ),
+ ),
+ migrations.AlterField(
+ model_name='exercise',
+ name='license_author_url',
+ field=models.URLField(blank=True, verbose_name='Link to author profile, if available'),
+ ),
+ migrations.AlterField(
+ model_name='exercise',
+ name='license_derivative_source_url',
+ field=models.URLField(
+ blank=True,
+ help_text=
+ 'Note that a derivative work is one which is not only based on a previous work, but which also contains sufficient new, creative content to entitle it to its own copyright.',
+ verbose_name='Link to the original source, if this is a derivative work'
+ ),
+ ),
+ migrations.AlterField(
+ model_name='exercise',
+ name='license_object_url',
+ field=models.URLField(blank=True, verbose_name='Link to original object, if available'),
+ ),
+ migrations.AlterField(
+ model_name='exercise',
+ name='license_title',
+ field=models.CharField(
+ blank=True,
+ max_length=300,
+ verbose_name='The original title of this object, if available'
+ ),
+ ),
+ 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.',
+ max_length=600,
+ null=True,
+ verbose_name='Author(s)'
+ ),
+ ),
+ migrations.AlterField(
+ model_name='exercisebase',
+ name='license_author_url',
+ field=models.URLField(blank=True, verbose_name='Link to author profile, if available'),
+ ),
+ migrations.AlterField(
+ model_name='exercisebase',
+ name='license_derivative_source_url',
+ field=models.URLField(
+ blank=True,
+ help_text=
+ 'Note that a derivative work is one which is not only based on a previous work, but which also contains sufficient new, creative content to entitle it to its own copyright.',
+ verbose_name='Link to the original source, if this is a derivative work'
+ ),
+ ),
+ migrations.AlterField(
+ model_name='exercisebase',
+ name='license_object_url',
+ field=models.URLField(blank=True, verbose_name='Link to original object, if available'),
+ ),
+ migrations.AlterField(
+ model_name='exercisebase',
+ name='license_title',
+ field=models.CharField(
+ blank=True,
+ max_length=300,
+ verbose_name='The original title of this object, if available'
+ ),
+ ),
+ 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.',
+ max_length=600,
+ null=True,
+ verbose_name='Author(s)'
+ ),
+ ),
+ migrations.AlterField(
+ model_name='exerciseimage',
+ name='license_author_url',
+ field=models.URLField(blank=True, verbose_name='Link to author profile, if available'),
+ ),
+ migrations.AlterField(
+ model_name='exerciseimage',
+ name='license_derivative_source_url',
+ field=models.URLField(
+ blank=True,
+ help_text=
+ 'Note that a derivative work is one which is not only based on a previous work, but which also contains sufficient new, creative content to entitle it to its own copyright.',
+ verbose_name='Link to the original source, if this is a derivative work'
+ ),
+ ),
+ migrations.AlterField(
+ model_name='exerciseimage',
+ name='license_object_url',
+ field=models.URLField(blank=True, verbose_name='Link to original object, if available'),
+ ),
+ migrations.AlterField(
+ model_name='exerciseimage',
+ name='license_title',
+ field=models.CharField(
+ blank=True,
+ max_length=300,
+ verbose_name='The original title of this object, if available'
+ ),
+ ),
+ 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.',
+ max_length=600,
+ null=True,
+ verbose_name='Author(s)'
+ ),
+ ),
+ migrations.AlterField(
+ model_name='exercisevideo',
+ name='license_author_url',
+ field=models.URLField(blank=True, verbose_name='Link to author profile, if available'),
+ ),
+ migrations.AlterField(
+ model_name='exercisevideo',
+ name='license_derivative_source_url',
+ field=models.URLField(
+ blank=True,
+ help_text=
+ 'Note that a derivative work is one which is not only based on a previous work, but which also contains sufficient new, creative content to entitle it to its own copyright.',
+ verbose_name='Link to the original source, if this is a derivative work'
+ ),
+ ),
+ migrations.AlterField(
+ model_name='exercisevideo',
+ name='license_object_url',
+ field=models.URLField(blank=True, verbose_name='Link to original object, if available'),
+ ),
+ migrations.AlterField(
+ model_name='exercisevideo',
+ name='license_title',
+ field=models.CharField(
+ blank=True,
+ max_length=300,
+ verbose_name='The original title of this object, if available'
+ ),
+ ),
+ 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.',
+ max_length=600,
+ null=True,
+ verbose_name='Author(s)'
+ ),
+ ),
+ migrations.AlterField(
+ model_name='historicalexercise',
+ name='license_author_url',
+ field=models.URLField(blank=True, verbose_name='Link to author profile, if available'),
+ ),
+ migrations.AlterField(
+ model_name='historicalexercise',
+ name='license_derivative_source_url',
+ field=models.URLField(
+ blank=True,
+ help_text=
+ 'Note that a derivative work is one which is not only based on a previous work, but which also contains sufficient new, creative content to entitle it to its own copyright.',
+ verbose_name='Link to the original source, if this is a derivative work'
+ ),
+ ),
+ migrations.AlterField(
+ model_name='historicalexercise',
+ name='license_object_url',
+ field=models.URLField(blank=True, verbose_name='Link to original object, if available'),
+ ),
+ migrations.AlterField(
+ model_name='historicalexercise',
+ name='license_title',
+ field=models.CharField(
+ blank=True,
+ max_length=300,
+ verbose_name='The original title of this object, if available'
+ ),
+ ),
+ 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.',
+ max_length=600,
+ null=True,
+ verbose_name='Author(s)'
+ ),
+ ),
+ migrations.AlterField(
+ model_name='historicalexercisebase',
+ name='license_author_url',
+ field=models.URLField(blank=True, verbose_name='Link to author profile, if available'),
+ ),
+ migrations.AlterField(
+ model_name='historicalexercisebase',
+ name='license_derivative_source_url',
+ field=models.URLField(
+ blank=True,
+ help_text=
+ 'Note that a derivative work is one which is not only based on a previous work, but which also contains sufficient new, creative content to entitle it to its own copyright.',
+ verbose_name='Link to the original source, if this is a derivative work'
+ ),
+ ),
+ migrations.AlterField(
+ model_name='historicalexercisebase',
+ name='license_object_url',
+ field=models.URLField(blank=True, verbose_name='Link to original object, if available'),
+ ),
+ migrations.AlterField(
+ model_name='historicalexercisebase',
+ name='license_title',
+ field=models.CharField(
+ blank=True,
+ max_length=300,
+ verbose_name='The original title of this object, if available'
+ ),
+ ),
+ 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.',
+ max_length=600,
+ null=True,
+ verbose_name='Author(s)'
+ ),
+ ),
+ migrations.AlterField(
+ model_name='historicalexerciseimage',
+ name='license_author_url',
+ field=models.URLField(blank=True, verbose_name='Link to author profile, if available'),
+ ),
+ migrations.AlterField(
+ model_name='historicalexerciseimage',
+ name='license_derivative_source_url',
+ field=models.URLField(
+ blank=True,
+ help_text=
+ 'Note that a derivative work is one which is not only based on a previous work, but which also contains sufficient new, creative content to entitle it to its own copyright.',
+ verbose_name='Link to the original source, if this is a derivative work'
+ ),
+ ),
+ migrations.AlterField(
+ model_name='historicalexerciseimage',
+ name='license_object_url',
+ field=models.URLField(blank=True, verbose_name='Link to original object, if available'),
+ ),
+ migrations.AlterField(
+ model_name='historicalexerciseimage',
+ name='license_title',
+ field=models.CharField(
+ blank=True,
+ max_length=300,
+ verbose_name='The original title of this object, if available'
+ ),
+ ),
+ 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.',
+ max_length=600,
+ null=True,
+ verbose_name='Author(s)'
+ ),
+ ),
+ migrations.AlterField(
+ model_name='historicalexercisevideo',
+ name='license_author_url',
+ field=models.URLField(blank=True, verbose_name='Link to author profile, if available'),
+ ),
+ migrations.AlterField(
+ model_name='historicalexercisevideo',
+ name='license_derivative_source_url',
+ field=models.URLField(
+ blank=True,
+ help_text=
+ 'Note that a derivative work is one which is not only based on a previous work, but which also contains sufficient new, creative content to entitle it to its own copyright.',
+ verbose_name='Link to the original source, if this is a derivative work'
+ ),
+ ),
+ migrations.AlterField(
+ model_name='historicalexercisevideo',
+ name='license_object_url',
+ field=models.URLField(blank=True, verbose_name='Link to original object, if available'),
+ ),
+ migrations.AlterField(
+ model_name='historicalexercisevideo',
+ name='license_title',
+ field=models.CharField(
+ blank=True,
+ max_length=300,
+ verbose_name='The original title of this object, if available'
+ ),
+ ),
+ ]
diff --git a/wger/nutrition/migrations/0019_alter_image_license_author_and_more.py b/wger/nutrition/migrations/0019_alter_image_license_author_and_more.py
new file mode 100644
index 000000000..3de146ecc
--- /dev/null
+++ b/wger/nutrition/migrations/0019_alter_image_license_author_and_more.py
@@ -0,0 +1,92 @@
+# Generated by Django 4.2.6 on 2023-11-23 19:46
+
+from django.db import migrations, models
+
+
+class Migration(migrations.Migration):
+ dependencies = [
+ ('nutrition', '0018_nutritionplan_goal_carbs_nutritionplan_goal_energy_and_more'),
+ ]
+
+ operations = [
+ migrations.AlterField(
+ model_name='image',
+ name='license_author',
+ field=models.CharField(
+ blank=True,
+ help_text='If you are not the author, enter the name or source here.',
+ max_length=600,
+ null=True,
+ verbose_name='Author(s)'
+ ),
+ ),
+ migrations.AlterField(
+ model_name='image',
+ name='license_author_url',
+ field=models.URLField(blank=True, verbose_name='Link to author profile, if available'),
+ ),
+ migrations.AlterField(
+ model_name='image',
+ name='license_derivative_source_url',
+ field=models.URLField(
+ blank=True,
+ help_text=
+ 'Note that a derivative work is one which is not only based on a previous work, but which also contains sufficient new, creative content to entitle it to its own copyright.',
+ verbose_name='Link to the original source, if this is a derivative work'
+ ),
+ ),
+ migrations.AlterField(
+ model_name='image',
+ name='license_object_url',
+ field=models.URLField(blank=True, verbose_name='Link to original object, if available'),
+ ),
+ migrations.AlterField(
+ model_name='image',
+ name='license_title',
+ field=models.CharField(
+ blank=True,
+ max_length=300,
+ verbose_name='The original title of this object, if available'
+ ),
+ ),
+ 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.',
+ max_length=600,
+ null=True,
+ verbose_name='Author(s)'
+ ),
+ ),
+ migrations.AlterField(
+ model_name='ingredient',
+ name='license_author_url',
+ field=models.URLField(blank=True, verbose_name='Link to author profile, if available'),
+ ),
+ migrations.AlterField(
+ model_name='ingredient',
+ name='license_derivative_source_url',
+ field=models.URLField(
+ blank=True,
+ help_text=
+ 'Note that a derivative work is one which is not only based on a previous work, but which also contains sufficient new, creative content to entitle it to its own copyright.',
+ verbose_name='Link to the original source, if this is a derivative work'
+ ),
+ ),
+ migrations.AlterField(
+ model_name='ingredient',
+ name='license_object_url',
+ field=models.URLField(blank=True, verbose_name='Link to original object, if available'),
+ ),
+ migrations.AlterField(
+ model_name='ingredient',
+ name='license_title',
+ field=models.CharField(
+ blank=True,
+ max_length=300,
+ verbose_name='The original title of this object, if available'
+ ),
+ ),
+ ]
diff --git a/wger/utils/models.py b/wger/utils/models.py
index a1ad06f02..1c1bcf83c 100644
--- a/wger/utils/models.py
+++ b/wger/utils/models.py
@@ -49,19 +49,19 @@ class AbstractLicenseModel(models.Model):
license_title = models.CharField(
verbose_name=_('The original title of this object, if available'),
- max_length=200,
+ max_length=300,
blank=True,
)
license_object_url = models.URLField(
verbose_name=_('Link to original object, if available'),
- max_length=100,
+ max_length=200,
blank=True,
)
license_author = models.CharField(
verbose_name=_('Author(s)'),
- max_length=200,
+ max_length=600,
blank=True,
null=True,
help_text=_('If you are not the author, enter the name or source here.')
@@ -69,7 +69,7 @@ class AbstractLicenseModel(models.Model):
license_author_url = models.URLField(
verbose_name=_('Link to author profile, if available'),
- max_length=100,
+ max_length=200,
blank=True,
)
@@ -80,7 +80,7 @@ class AbstractLicenseModel(models.Model):
'work, but which also contains sufficient new, creative content to entitle it '
'to its own copyright.'
),
- max_length=100,
+ max_length=200,
blank=True,
)