diff --git a/src/camps/migrations/0022_camp_colour.py b/src/camps/migrations/0022_camp_colour.py new file mode 100644 index 00000000..aba2078f --- /dev/null +++ b/src/camps/migrations/0022_camp_colour.py @@ -0,0 +1,21 @@ +# -*- coding: utf-8 -*- +# Generated by Django 1.10.5 on 2017-08-14 17:10 +from __future__ import unicode_literals + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('camps', '0021_auto_20170711_2247'), + ] + + operations = [ + migrations.AddField( + model_name='camp', + name='colour', + field=models.CharField(default='#000000', help_text='The primary colour for the camp in hex', max_length=7, verbose_name='Colour'), + preserve_default=False, + ), + ] diff --git a/src/camps/models.py b/src/camps/models.py index 62b034d9..809dcc32 100644 --- a/src/camps/models.py +++ b/src/camps/models.py @@ -54,6 +54,12 @@ class Camp(CreatedUpdatedModel, UUIDModel): default=False ) + colour = models.CharField( + verbose_name='Colour', + help_text='The primary colour for the camp in hex', + max_length=7 + ) + def get_absolute_url(self): return reverse('camp_detail', kwargs={'camp_slug': self.slug})