From 6c3d38ff0ac743008830c4cf5d3cc98de868fd7d Mon Sep 17 00:00:00 2001
From: Christoph Berg <myon@debian.org>
Date: Mon, 12 Oct 2026 14:17:58 +0200
Subject: [PATCH v13 3/3] Extend badge title to 255 chars

Daniel pointed out that a reasonable badge title like "Nordic PGDay 2026
Program Committee" is already longer than the 32 chars we catered for
(it's 35). Extend it, we still have moderation to reject overly long
names.
---
 .../migrations/0006_alter_badge_badge.py      | 25 +++++++++++++++++++
 pgweb/contributors/models.py                  |  2 +-
 2 files changed, 26 insertions(+), 1 deletion(-)
 create mode 100644 pgweb/contributors/migrations/0006_alter_badge_badge.py

diff --git a/pgweb/contributors/migrations/0006_alter_badge_badge.py b/pgweb/contributors/migrations/0006_alter_badge_badge.py
new file mode 100644
index 00000000..f69c47f3
--- /dev/null
+++ b/pgweb/contributors/migrations/0006_alter_badge_badge.py
@@ -0,0 +1,25 @@
+# Generated by Django 5.2.17 on 2026-10-12 12:17
+
+from django.db import migrations, models
+
+
+class Migration(migrations.Migration):
+
+    dependencies = [
+        (
+            "contributors",
+            "0005_alter_contributor_ctype_alter_contributor_email_and_more",
+        ),
+    ]
+
+    operations = [
+        migrations.AlterField(
+            model_name="badge",
+            name="badge",
+            field=models.CharField(
+                help_text='Title of this badge, e.g. "PGConf.EU 2025 Speaker".',
+                max_length=255,
+                unique=True,
+            ),
+        ),
+    ]
diff --git a/pgweb/contributors/models.py b/pgweb/contributors/models.py
index 7d55a0dc..e5efab79 100644
--- a/pgweb/contributors/models.py
+++ b/pgweb/contributors/models.py
@@ -98,7 +98,7 @@ class BadgeManager(models.Manager):
 
 class Badge(TwostateModerateModel):
     org = models.ForeignKey(Organisation, null=False, blank=False, verbose_name="Organisation", help_text=ORGANISATION_HINT_TEXT, on_delete=models.CASCADE)
-    badge = models.CharField(max_length=32, null=False, blank=False, unique=True, help_text='Title of this badge, e.g. "PGConf.EU 2025 Speaker".')
+    badge = models.CharField(max_length=255, null=False, blank=False, unique=True, help_text='Title of this badge, e.g. "PGConf.EU 2025 Speaker".')
     slug = models.SlugField(max_length=64, null=False, blank=False, unique=True, help_text='URL-friendly identifier for the badge page. Generated from the title when the badge is created, and kept fixed after that.')
     description = models.TextField(null=True, blank=True, help_text='What did the people do who contributed here?')
     url = models.URLField(max_length=100, null=True, blank=True, verbose_name='Contribution URL', help_text='URL for this contribution, e.g. the conference homepage. (Leave blank when there is no URL.)')
-- 
2.53.0

