This commit is contained in:
Stephan Telling 2017-08-14 19:10:58 +02:00
parent 973bdc575c
commit 477b1b85de
No known key found for this signature in database
GPG Key ID: D4892289F36ADA9B
2 changed files with 27 additions and 0 deletions

View File

@ -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,
),
]

View File

@ -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})