Electronics & Programming

develissimo

Open Source electronics development and programming

  • You are not logged in.

#1 Nov. 17, 2005 22:44:15

Steffen G.
Registered: 2009-11-02
Reputation: +  0  -
Profile   Send e-mail  

Using umlauts


Using an umlaut in a form-field of the admin-interface causes the
validator to complain about 'only letters, numbers and underscores'
being allowed.
Is there a way to enable umlauts in form-fields?


best regards

Offline

#2 Nov. 17, 2005 22:48:44

Jacob K.
Registered: 2009-11-02
Reputation: +  0  -
Profile   Send e-mail  

Using umlauts


On Nov 17, 2005, at 4:43 PM, Steffen Glückselig wrote:Using an umlaut in a form-field of the admin-interface causes the
validator to complain about 'only letters, numbers and underscores'
being allowed.
Is there a way to enable umlauts in form-fields?Sounds like you're using a SlugField or a field with a isAlphaNumericvalidator; regular CharFields allow any character you can possibly type.Jacob

Offline

#3 Nov. 18, 2005 17:36:49

Steffen G.
Registered: 2009-11-02
Reputation: +  0  -
Profile   Send e-mail  

Using umlauts


Right, I changed the slugfield into a charfield.

I cannot add a user with an username that contains an umlaut with the
default admin-interface, though. How could I change that?

best regards

Offline

#4 Nov. 19, 2005 11:11:50

h.
Registered: 2009-11-02
Reputation: +  0  -
Profile   Send e-mail  

Using umlauts


>I cannot add a user with an username that contains an umlaut >with the
>default admin-interface, though. How could I change that?

As with all usernames in computing, it's best not to do that. Reason:
usernames are often used in situations where you can't specify the
string encoding and so the system can't know how to decode it (user
names are used in cookies, in HTTP headers for example - both not
having a concept of string encoding).

So it's much better to stick to 7bit chars for user names. You can set
the users real name in Django, though - and there you can use all
characters you want.

bye, Georg

Offline

#5 Nov. 19, 2005 21:04:16

David A.
Registered: 2009-11-02
Reputation: +  0  -
Profile   Send e-mail  

Using umlauts


On 11/19/05,hugo<> wrote:So it's much better to stick to 7bit chars for user names. You can setthe users real name in Django, though - and there you can use allcharacters you want.... which doesn't work for a bunch of people around the world =). 
One alternative is to let people create what they think is a username
using whatever encoding makes sense, and generate "usernames" behind
the scenes that the users are never exposed to.  That's what I
figure folks like Flickr do, giving their users full unicode monikers,
but not dealing with them in the code.More work, but a better user experience for a bunch of folks.--david

Offline

#6 Nov. 19, 2005 22:56:00

h.
Registered: 2009-11-02
Reputation: +  0  -
Profile   Send e-mail  

Using umlauts


>... which doesn't work for a bunch of people around the world =). One
>alternative is to let people create what they think is a username using

Since when is it impossible for people to select a 7bit ascii username?
Sure, it might not be one you like, but I never heard of any keyboard
that disallows entering of 7bit ascii characters :-)

Sure, it might be a nicer user experience if you can select a username
with unicode characters in it, but I don't think this is a real problem
- everyone using the internet will already have things like email
addresses and stuff like that where he can't use unicode characters,
too.

This is not a new restriction introduced by Django, it's a very common
restriction all over the internet protocols. So maybe we shouldn't try
to solve the worlds problems all at once with Django, we still need
stuff to do with 2.0 ;-)

bye, Georg

Offline

#7 Nov. 20, 2005 01:20:51

David A.
Registered: 2009-11-02
Reputation: +  0  -
Profile   Send e-mail  

Using umlauts


On 11/19/05,hugo<> wrote:This is not a new restriction introduced by Django, it's a very common restriction all over the internet protocols. So maybe we shouldn't try to solve the worlds problems all at once with Django, we still need stuff to do with
2.0 ;-)I didn't mean to imply that this was a problem Django needed to solve, in any version!  The point I was trying to make  was that even though the username is restricted to 7bit, you, as a developer, can make the nicer user experience using an extra layer.--david

Offline

Board footer

Moderator control

Enjoy the 18th of November
PoweredBy

The Forums are managed by develissimo stuff members, if you find any issues or misplaced content please help us to fix it. Thank you! Tell us via Contact Options
Leave a Message
Welcome to Develissimo Live Support