[people] Add boardgamearena_id field

This commit is contained in:
2026-03-21 11:32:08 -04:00
parent b75b259bd9
commit 5e835595c3
3 changed files with 35 additions and 2 deletions

View File

@ -0,0 +1,18 @@
# Generated by Django 4.2.29 on 2026-03-21 15:29
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
("people", "0004_add_scrobble_count"),
]
operations = [
migrations.AddField(
model_name="person",
name="boardgamearena_id",
field=models.CharField(blank=True, max_length=255, null=True),
),
]

View File

@ -18,6 +18,7 @@ class Person(TimeStampedModel):
)
name = models.CharField(max_length=100, **BNULL)
bgstats_id = models.UUIDField(**BNULL)
boardgamearena_id = models.CharField(max_length=255, **BNULL)
bgg_username = models.CharField(max_length=100, **BNULL)
lichess_username = models.CharField(max_length=100, **BNULL)
bio = models.TextField(**BNULL)

View File

@ -6,7 +6,14 @@ from people.models import Person
class PersonCreateUpdateView(generic.CreateView):
model = Person
fields = ["name", "bgstats_id", "bgg_username", "lichess_username", "bio"]
fields = [
"name",
"bgstats_id",
"boardgamearena_id",
"bgg_username",
"lichess_username",
"bio",
]
template_name = "people/person_form.html"
success_url = reverse_lazy("people:person_form")
@ -29,7 +36,14 @@ class PersonCreateUpdateView(generic.CreateView):
class PersonUpdateView(generic.UpdateView):
model = Person
fields = ["name", "bgstats_id", "bgg_username", "lichess_username", "bio"]
fields = [
"name",
"bgstats_id",
"boardgamearena_id",
"bgg_username",
"lichess_username",
"bio",
]
template_name = "people/person_form.html"
success_url = reverse_lazy("people:person_form")