Skip to content

Commit

Permalink
Feat: add descriptions to chain features (#1291)
Browse files Browse the repository at this point in the history
* Feat: add descriptions to chain features

* Update migration
  • Loading branch information
katspaugh authored Nov 21, 2024
1 parent a2e22f0 commit 2342512
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/chains/admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,4 +58,4 @@ class WalletAdmin(admin.ModelAdmin[Wallet]):

@admin.register(Feature)
class FeatureAdmin(admin.ModelAdmin[Feature]):
list_display = ("key",)
list_display = ("key", "description")
17 changes: 17 additions & 0 deletions src/chains/migrations/0045_populate_feature_description.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Generated by Django 5.0.8 on 2024-11-21 13:40

from django.db import migrations, models


class Migration(migrations.Migration):
dependencies = [
("chains", "0044_chain_beacon_chain_explorer_uri_public_key_template"),
]

operations = [
migrations.AddField(
model_name="feature",
name="description",
field=models.CharField(max_length=255, default=''),
),
]
2 changes: 2 additions & 0 deletions src/chains/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -254,6 +254,8 @@ class Feature(models.Model):
max_length=255,
help_text="The unique name/key that identifies this feature",
)
description = models.CharField(max_length=255, default="")


def __str__(self) -> str:
return f"Chain Feature: {self.key}"

0 comments on commit 2342512

Please sign in to comment.