>> The Django auth module is just a standard Django app. If >> you look in django/contrib/auth/models.py you'll see that >> the User.username field is defined with a validator_list >> of "[validators.isAlphaNumeric]". >> >> In theory, you should be able to remove this validator to >> allow for any random characters your users want to >> masochistically choose. > > I was more hoping for a solution that didn't require > modifying the Django codebase. Perhaps I'll tinker and > submit a patch if this is the only viable solution.
(top-posting fixed) If you're tracking the SVN version of Django rather than a release version such as 0.95 or 0.96, then Subversion is smart enough to continue to pull down Django's changes while still keeping your own changes. The only time you have to think about it is if/when the Django team changes that particular line in a way that conflicts with your own changes. Another option would be to use a distributed VCS locally (I like Mercurial which is fast, written mostly in Python, easy to understand from my background in SVN unlike git, and plays nicely with other non-distributed VCS's). You can pull the upstream changes into your upstream folder and then merge any changes therein into your own personal copy of Django. It's not quite the same big win here, but it's a little smarter than SVN about merge histories which means that if you want to track *your* changes to Django, you can. I'm not sure that a patch would be accepted because spaces are rarely considered good practice for usernames in most apps. There's a bit of a misnomer, as the filter isAlphaNumeric uses "\w" in its regexp which also allows for the underscore character which is neither alpha nor numeric. However, you can easily change the validator to an empty list, or to a less restricted regexp using the MatchesRegularExpression validator. -tim --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django users" 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-users?hl=en -~----------~----~----~----~------~----~------~--~---

