Viktor wrote: > The problem begins when you want to have nonenglish slug (slug on a > language that uses nonascii characters). > For example if I want to have a serban cyrillic slug: наслов_на_српском, > it is perfectly valid slug if you read it on serbian, just aphanumeric > characters + underscore + hyphen, nothing more... But the current isSlug > validator does not accept it.
i see... seems that it boils down to what you call 'valid'... i had the feeling that slugs were meant to be used as parts of URLs... and i'm sure you know that those cyrillic slugs, if part of an url will get submitted in URLencoded form. even if it is hidden by the browser. anyway...maybe it would be a good idea to add a boolean setting that limits the slug to ascii (the old behaviour) ... like slug = SlugField(only_ascii=True), or something like that, because i can imagine that some people want to restrict to that. p.s: to make sure we understand each other. i understand the need for being able to create non-english links/urls. i'm just not sure if a Slug is the best place for it. p.s.2: btw. are non-english URLs common/widespread nowadays? gabor > > gabor wrote: > > could you please describe some use-cases for this feature? >> because for me it seems a little...strange.. >> the whole point of the Slug is to only contain alphanumeric (as in >> ascii-alphanumeric) characters + underscore + hyphen. >> >> with the utf-8 change it can contain underscore+hyphen + all unicode >> symbols that are considered as alphanumeric... >> >> but if you allow so many symbols, why to use a SlugField at all? why >> don't allow all the unicode characters? >> >> i'm pretty sure i'm missing something there... :-( > > > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-developers -~----------~----~----~----~------~----~------~--~---
