diff --git a/src/camps/migrations/0030_camp_light_text.py b/src/camps/migrations/0030_camp_light_text.py new file mode 100644 index 00000000..9663aba5 --- /dev/null +++ b/src/camps/migrations/0030_camp_light_text.py @@ -0,0 +1,18 @@ +# Generated by Django 2.0.4 on 2018-08-18 15:39 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('camps', '0029_auto_20180815_2018'), + ] + + operations = [ + migrations.AddField( + model_name='camp', + name='light_text', + field=models.BooleanField(default=True, help_text='Check if this camps colour requires white text, uncheck if black text is better'), + ), + ] diff --git a/src/camps/models.py b/src/camps/models.py index 3a755ac9..b0610a7e 100644 --- a/src/camps/models.py +++ b/src/camps/models.py @@ -68,6 +68,11 @@ class Camp(CreatedUpdatedModel, UUIDModel): max_length=7 ) + light_text = models.BooleanField( + default=True, + help_text='Check if this camps colour requires white text, uncheck if black text is better', + ) + call_for_participation_open = models.BooleanField( help_text='Check if the Call for Participation is open for this camp', default=False, diff --git a/src/camps/templates/camp_list.html b/src/camps/templates/camp_list.html index 33b25296..abc8537d 100644 --- a/src/camps/templates/camp_list.html +++ b/src/camps/templates/camp_list.html @@ -24,7 +24,7 @@ {{ listcamp.buildup.lower }} to {{ listcamp.buildup.upper }} {{ listcamp.camp.lower }} to {{ listcamp.camp.upper }} {{ listcamp.teardown.lower }} to {{ listcamp.teardown.upper }} - {{ listcamp.colour }} + {% if listcamp.light_text %}{% else %}{% endif %}{{ listcamp.colour }} {% empty %} diff --git a/src/utils/management/commands/bootstrap-devsite.py b/src/utils/management/commands/bootstrap-devsite.py index 2cafcc00..f0e4bf5b 100644 --- a/src/utils/management/commands/bootstrap-devsite.py +++ b/src/utils/management/commands/bootstrap-devsite.py @@ -61,7 +61,7 @@ class Command(BaseCommand): timezone.datetime(2016, 9, 4, 12, 0, tzinfo=timezone.utc), timezone.datetime(2016, 9, 6, 12, 0, tzinfo=timezone.utc), ), - colour='#000000', + colour='#004dff', ) camp2017 = Camp.objects.create( @@ -81,7 +81,7 @@ class Command(BaseCommand): timezone.datetime(2017, 9, 4, 12, 0, tzinfo=timezone.utc), timezone.datetime(2017, 9, 6, 12, 0, tzinfo=timezone.utc), ), - colour='#000000', + colour='#750787', ) camp2018 = Camp.objects.create( @@ -103,7 +103,7 @@ class Command(BaseCommand): timezone.datetime(2018, 9, 4, 12, 0, tzinfo=timezone.utc), timezone.datetime(2018, 9, 6, 12, 0, tzinfo=timezone.utc), ), - colour='#000000', + colour='#008026', ) self.output("Creating users...")