Expand Nostr key field to 64 chars (32 hex bytes)

This commit is contained in:
Danielle McLean 2023-08-10 19:28:04 +10:00
parent 960e64963f
commit d0bd6c1231
Signed by: 00dani
GPG key ID: 52C059C3B22A753E
2 changed files with 34 additions and 2 deletions

View file

@ -0,0 +1,32 @@
# Generated by Django 3.2.20 on 2023-08-10 09:27
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
("users", "0018_auto_20230810_1754"),
]
operations = [
migrations.AlterField(
model_name="user",
name="nostr_key",
field=models.CharField(
blank=True,
help_text="A Nostr public key in 32-byte hex format (64 characters)",
max_length=64,
null=True,
unique=True,
),
),
migrations.AlterField(
model_name="user",
name="nostr_relays",
field=models.JSONField(
blank=True,
default=list,
help_text="An array of Nostr relay URLs that this public key posts to",
),
),
]

View file

@ -82,11 +82,11 @@ class User(ModelMeta, AbstractUser):
)
nostr_key = models.CharField(
max_length=32,
max_length=64,
unique=True,
blank=True,
null=True,
help_text="A Nostr public key in 32-byte hex format",
help_text="A Nostr public key in 32-byte hex format (64 characters)",
)
nostr_relays = models.JSONField(
default=list,