fix #147
This commit is contained in:
parent
973bdc575c
commit
477b1b85de
21
src/camps/migrations/0022_camp_colour.py
Normal file
21
src/camps/migrations/0022_camp_colour.py
Normal 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,
|
||||||
|
),
|
||||||
|
]
|
|
@ -54,6 +54,12 @@ class Camp(CreatedUpdatedModel, UUIDModel):
|
||||||
default=False
|
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):
|
def get_absolute_url(self):
|
||||||
return reverse('camp_detail', kwargs={'camp_slug': self.slug})
|
return reverse('camp_detail', kwargs={'camp_slug': self.slug})
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue