Skip to content

Commit

Permalink
add blank=True to nullable Token fields for admin
Browse files Browse the repository at this point in the history
  • Loading branch information
lachlanglen committed Jul 18, 2024
1 parent 167bc4d commit 2b57240
Show file tree
Hide file tree
Showing 2 changed files with 60 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
# Generated by Django 5.0.4 on 2024-07-18 13:46

from django.db import migrations, models


class Migration(migrations.Migration):

dependencies = [
("tokens", "0004_alter_token_coingecko_id"),
]

operations = [
migrations.AlterField(
model_name="token",
name="coingecko_id",
field=models.CharField(
blank=True,
help_text="Token id on coingecko.",
max_length=255,
null=True,
verbose_name="coingecko_id",
),
),
migrations.AlterField(
model_name="token",
name="icon",
field=models.TextField(
blank=True,
help_text="Token icon (base64 data URL).",
null=True,
verbose_name="icon",
),
),
migrations.AlterField(
model_name="token",
name="name",
field=models.CharField(
blank=True,
help_text="Token name.",
max_length=255,
null=True,
verbose_name="name",
),
),
migrations.AlterField(
model_name="token",
name="symbol",
field=models.CharField(
blank=True,
help_text="Token symbol.",
max_length=255,
null=True,
verbose_name="symbol",
),
),
]
4 changes: 4 additions & 0 deletions tokens/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,17 +24,20 @@ class Token(models.Model):
_("name"),
max_length=255,
null=True,
blank=True,
help_text=_("Token name."),
)
symbol = models.CharField(
_("symbol"),
max_length=255,
null=True,
blank=True,
help_text=_("Token symbol."),
)
icon = models.TextField(
_("icon"),
null=True,
blank=True,
help_text=_("Token icon (base64 data URL)."),
)
decimals = models.PositiveIntegerField(
Expand All @@ -46,6 +49,7 @@ class Token(models.Model):
_("coingecko_id"),
max_length=255,
null=True,
blank=True,
help_text=_("Token id on coingecko."),
)

Expand Down

0 comments on commit 2b57240

Please sign in to comment.