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.
On Jul 14, 1:38 pm, Tim Chase <[EMAIL PROTECTED]> wrote: > > I've noticed that within the admin interface, if you try to > > edit or add a username that has spaces in it, you get a > > validation error stating that there can be no spaces in > > usernames. However, if I edit the actual table data manually > > and try to login or perform other actions, everything seems > > to work fine. This seems to suggest that there might not be > > any problem with spaces in usernames. Is there a configuration > > directive for settings.py to allow spaces in usernames? Is > > there any way that one could be added if there isn't already? > > 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 don't know if there are any ripple-down effects of > this, so you'll want to test the results. My first hunting would > be for places that a username is validated with a regexp, and > ensure that it matches whatever validator your username's > CharField describes. > > -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 -~----------~----~----~----~------~----~------~--~---

