Skip to content

Commit 703c6e9

Browse files
partizipationgoapunk
authored andcommitted
organisations: add edit slug in admin
Fixes #8593
1 parent ed68a88 commit 703c6e9

File tree

4 files changed

+26
-2
lines changed

4 files changed

+26
-2
lines changed

apps/organisations/admin.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ class OrganisationAdmin(TranslatableAdmin):
3838
MemberInline,
3939
]
4040
fieldsets = (
41-
(None, {"fields": ("name", "initiators", "title")}),
41+
(None, {"fields": ("name", "initiators", "title", "slug")}),
4242
(
4343
"Translations",
4444
{
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# Generated by Django 4.2.18 on 2025-01-20 15:20
2+
3+
import autoslug.fields
4+
from django.db import migrations
5+
6+
7+
class Migration(migrations.Migration):
8+
9+
dependencies = [
10+
("a4_candy_organisations", "0024_organisation_enable_geolocation"),
11+
]
12+
13+
operations = [
14+
migrations.AlterField(
15+
model_name="organisation",
16+
name="slug",
17+
field=autoslug.fields.AutoSlugField(
18+
editable=True, populate_from="name", unique=True
19+
),
20+
),
21+
]

apps/organisations/models.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818

1919

2020
class Organisation(TranslatableModel):
21-
slug = AutoSlugField(populate_from="name", unique=True)
21+
slug = AutoSlugField(populate_from="name", unique=True, editable=True)
2222
name = models.CharField(max_length=512)
2323
initiators = models.ManyToManyField(settings.AUTH_USER_MODEL, blank=True)
2424
title = models.CharField(

changelog/8593.md

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
### Added
2+
3+
- admin users can edit slug in the organisation admin

0 commit comments

Comments
 (0)