First time here? Check out the FAQ!
3

user creation "screen name" vs "username" in admin page

When a user creates his local account, he can fill his screen name with spaces. In the administration page, the username must contain only letters, numbers and underscores. So the admisitrator has to modify the username to submit another modification to his profile.

Samuel's avatar
425
Samuel
asked 2011-05-25 03:57:37 -0600
edit flag offensive 0 remove flag close merge delete

Comments

add a comment see more comments

1 Answer

2

Yes, just tested this. It is impossible to edit profile from django admin panel when user's user name has space.

Django's auth app does not allow spaces in the user name (it is a required field, equivalent to login name).

I think the solution is to forbid space in the username field and stick to the format for the user name that django expects.

The display name may be combined from first and last names, and first and last names would be accessible to edit from the user profile page.

There will be a side effect with this change - all users whose names do not agree with the django's convention will be automatically renamed, and they should also be informed of the change.

A management command will be required to auto-rename users and send them notifications of the change.

Evgeny's avatar
13.2k
Evgeny
updated 2011-05-25 15:37:57 -0600, answered 2011-05-25 15:09:09 -0600
edit flag offensive 0 remove flag delete link

Comments

I agree with this proposal. So the user will be asked to fill the last and first name fields on the creation account page. Will the username be auto-generated?
Samuel's avatar Samuel (2011-05-31 09:44:46 -0600) edit
FYI: I have solved the problem on my side by strenghtening the ldap connectivity : the fields screename & email are automatically filled at account creation and the user cannot update them.
Samuel's avatar Samuel (2011-08-01 04:09:34 -0600) edit
Is it available on github - could you give me a url if I can merge your changes?
Evgeny's avatar Evgeny (2011-08-01 08:56:49 -0600) edit
add a comment see more comments