mysociety / yournextrepresentative

A website for crowd-sourcing structured election candidate data
https://candidates.democracyclub.org.uk/
GNU Affero General Public License v3.0
56 stars 21 forks source link

Make more use of slugs when 'reversing' URLs #824

Closed wfdd closed 8 years ago

wfdd commented 8 years ago

Though slugs are generally not required for the site to function, they're good indicators of what one might expect when opening a link. Slugs could also be stored in extra to avoid having to regenerate them upon request.

wfdd commented 8 years ago

This turned out to be an issue with the built-in slugify filter, which can't handle Greek characters.

In [1]: from django.template.defaultfilters import slugify

In [2]: slugify('Γιάννης')
Out[2]: ''

The filter's used in place of the python-slugify function in templates.

wfdd commented 8 years ago

Closing in favour of #880.