Skip to content

Commit

Permalink
add avtion color hexa code
Browse files Browse the repository at this point in the history
  • Loading branch information
yomguy committed Sep 6, 2023
1 parent 76c569a commit 63a7e68
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 2 deletions.
21 changes: 19 additions & 2 deletions organization/core/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -691,14 +691,31 @@ class Meta:
abstract = True


class Action(Named, URL, SimpleImage, Featured):
class Colored(models.Model):
"""
Abstract model that provides a color property of an object.
"""

hex_color = models.CharField(
_("color hexa code"),
max_length=7,
blank=True,
null=True
)

class Meta:
abstract = True


class Action(Named, URL, SimpleImage, Featured, Colored):
"""
Abstract model that provides an Action object.
"""

action = models.CharField(_('action'),
max_length=1024,
null=True, blank=True
null=True,
blank=True
)

class Meta:
Expand Down
18 changes: 18 additions & 0 deletions organization/pages/migrations/0062_pageaction_hex_color.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Generated by Django 3.2.19 on 2023-09-06 12:44

from django.db import migrations, models


class Migration(migrations.Migration):

dependencies = [
('organization_pages', '0061_pageaction_is_featured'),
]

operations = [
migrations.AddField(
model_name='pageaction',
name='hex_color',
field=models.CharField(blank=True, max_length=7, null=True, verbose_name='color hexa code'),
),
]

0 comments on commit 63a7e68

Please sign in to comment.