Skip to content

apps/schedule/frab_exporter: re-add event slug to frab slug#1922

Open
Kunsi wants to merge 2 commits intoemfcamp:mainfrom
Kunsi:kunsi-frab-fixups
Open

apps/schedule/frab_exporter: re-add event slug to frab slug#1922
Kunsi wants to merge 2 commits intoemfcamp:mainfrom
Kunsi:kunsi-frab-fixups

Conversation

@Kunsi
Copy link
Copy Markdown
Contributor

@Kunsi Kunsi commented Mar 22, 2026

Seems like this got lost in a1a8af4

@Kunsi Kunsi requested a review from marksteward March 22, 2026 06:45
@marksteward
Copy link
Copy Markdown
Member

I left that off because we generate slugs with non-ascii characters in, such as blåhaj.

If we want to add them back, we should work out how to make python-slugify generate ascii-only slugs just for frab.

@Kunsi
Copy link
Copy Markdown
Contributor Author

Kunsi commented Mar 22, 2026

Would you object to just implement slugification ourselves? I recently(tm) re-did slugs for pretalx as well: https://github.com/pretalx/pretalx/blob/main/src/pretalx/schedule/models/slot.py#L218-L226

(Alternatively we could adjust the schema to include non-ascii characters, i can discuss that with the schema maintainers)

@Kunsi Kunsi force-pushed the kunsi-frab-fixups branch from 28c76b9 to 701a002 Compare March 22, 2026 14:55
@Kunsi
Copy link
Copy Markdown
Contributor Author

Kunsi commented Mar 22, 2026

Would you object to just implement slugification ourselves?

I implemented that in the exporter. We can always move this to somewhere else and use it everywhere at a later point in time.

@marksteward
Copy link
Copy Markdown
Member

marksteward commented Mar 22, 2026

Sure, though it might be as simple as having schedule_item_slug accept allow_unicode.

python-slugify already has a matching regex, and uses unidecode so CJK, Arabic and Hindi characters aren't discarded. From a quick check, the only difference when passing allow_unicode=False vs True is in how apostrophes and £ are treated.

Ultimately I'd prefer to have unicode slugs, but I don't want us to be the cause of breaking pipelines.

@Kunsi
Copy link
Copy Markdown
Contributor Author

Kunsi commented Mar 22, 2026

I'll take a look at it later today or tomorrow. I don't know of anything that would break if we had non-ascii characters in the slug (well, apart from the schema validation atleast).

@Kunsi Kunsi force-pushed the kunsi-frab-fixups branch from 0e8ce24 to ab933ed Compare April 3, 2026 19:11
@Kunsi
Copy link
Copy Markdown
Contributor Author

Kunsi commented Apr 3, 2026

you were right, that's much easier. i also rebased onto current main and tested that everything works correctly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants