Repository: kartoza/prj.app

Issue:
fewer mandatory fields
some fields like exercise fields should not be mandatory for cases where the sheet is purely informative (like http://changelog.qgis.org/en/inasafe-realtime2/section/introduction-to-inasafe-realtime/detail/40/)


Discussion:
@gubuntu Besides the exercise fields, which fields that you think it's not necessary mandatory?

Resolving patch:
diff --git a/django_project/lesson/migrations/0027_auto_20180410_1007.py b/django_project/lesson/migrations/0027_auto_20180410_1007.py
new file mode 100644
--- /dev/null
+++ b/django_project/lesson/migrations/0027_auto_20180410_1007.py
@@ -0,0 +1,74 @@
+# -*- coding: utf-8 -*-
+from __future__ import unicode_literals
+
+from django.db import migrations, models
+
+
+class Migration(migrations.Migration):
+
+    dependencies = [
+        ('lesson', '0026_auto_20180314_0438'),
+    ]
+
+    operations = [
+        migrations.AlterField(
+            model_name='worksheet',
+            name='exercise_goal',
+            field=models.CharField(help_text='The goal of the exercise.', max_length=200, null=True, blank=True),
+        ),
+        migrations.AlterField(
+            model_name='worksheet',
+            name='exercise_goal_en',
+            field=models.CharField(help_text='The goal of the exercise.', max_length=200, null=True, blank=True),
+        ),
+        migrations.AlterField(
+            model_name='worksheet',
+            name='exercise_goal_ind',
+            field=models.CharField(help_text='The goal of the exercise.', max_length=200, null=True, blank=True),
+        ),
+        migrations.AlterField(
+            model_name='worksheet',
+            name='exercise_task',
+            field=models.TextField(help_text='Task in the exercise. Markdown is supported.', null=True, blank=True),
+        ),
+        migrations.AlterField(
+            model_name='worksheet',
+            name='exercise_task_en',
+            field=models.TextField(help_text='Task in the exercise. Markdown is supported.', null=True, blank=True),
+        ),
+        migrations.AlterField(
+            model_name='worksheet',
+            name='exercise_task_ind',
+            field=models.TextField(help_text='Task in the exercise. Markdown is supported.', null=True, blank=True),
+        ),
+        migrations.AlterField(
+            model_name='worksheet',
+            name='more_about_text',
+            field=models.TextField(help_text='More detail about the content of the worksheet. Markdown is supported.', null=True, blank=True),
+        ),
+        migrations.AlterField(
+            model_name='worksheet',
+            name='more_about_text_en',
+            field=models.TextField(help_text='More detail about the content of the worksheet. Markdown is supported.', null=True, blank=True),
+        ),
+        migrations.AlterField(
+            model_name='worksheet',
+            name='more_about_text_ind',
+            field=models.TextField(help_text='More detail about the content of the worksheet. Markdown is supported.', null=True, blank=True),
+        ),
+        migrations.AlterField(
+            model_name='worksheet',
+            name='more_about_title',
+            field=models.CharField(default='More about', max_length=200, null=True, help_text='More about title.', blank=True),
+        ),
+        migrations.AlterField(
+            model_name='worksheet',
+            name='more_about_title_en',
+            field=models.CharField(default='More about', max_length=200, null=True, help_text='More about title.', blank=True),
+        ),
+        migrations.AlterField(
+            model_name='worksheet',
+            name='more_about_title_ind',
+            field=models.CharField(default='More about', max_length=200, null=True, help_text='More about title.', blank=True),
+        ),
+    ]
diff --git a/django_project/lesson/models/worksheet.py b/django_project/lesson/models/worksheet.py
--- a/django_project/lesson/models/worksheet.py
+++ b/django_project/lesson/models/worksheet.py
@@ -72,15 +72,15 @@ class Worksheet(TranslationMixin):
 
     exercise_goal = models.CharField(
         help_text=_('The goal of the exercise.'),
-        blank=False,
-        null=False,
+        blank=True,
+        null=True,
         max_length=200,
     )
 
     exercise_task = models.TextField(
         help_text=_('Task in the exercise. Markdown is supported.'),
-        blank=False,
-        null=False,
+        blank=True,
+        null=True,
     )
 
     exercise_image = models.ImageField(
@@ -96,8 +96,8 @@ class Worksheet(TranslationMixin):
 
     more_about_title = models.CharField(
         help_text=_('More about title.'),
-        blank=False,
-        null=False,
+        blank=True,
+        null=True,
         max_length=200,
         default=_('More about'),
     )
@@ -106,8 +106,8 @@ class Worksheet(TranslationMixin):
         help_text=_(
             'More detail about the content of the worksheet. '
             'Markdown is supported.'),
-        blank=False,
-        null=False,
+        blank=True,
+        null=True,
     )
 
     more_about_image = models.ImageField(


Test patch: