* Changed the way how default nicknames for new users are computed. It now uses
the name part of an email address and simply adds a number if the nickname
already exists.
* Improved nickname validation. Guido proposed a guideline in on the
codereview-list
(http://groups.google.com/group/codereview-list/msg/52f3fcd0de0d6682). This
change moves the validation to the Django form and tries to follow that proposal
with user friendly error messages.
Regarding the update of accounts with duplicate nicknames. I've gave the remote
API a try. It looks much easier and intuitive than using a special URL to update
the records in the datastore. But I've just tried it against my testing instance
with <10 accounts in the datastore.
update_accounts.py has instructions how to use it. Let me know what you think
about this approach.
http://codereview.appspot.com/28159/diff/1/2
File app.yaml (right):
http://codereview.appspot.com/28159/diff/1/2#newcode28
Line 28: login: admin
There's actually no need to commit this, but it's required to run
appengine_console.py for updating the accounts.
The approach looks good to me (wasn't aware of the new remote api). One question: ...
14 years, 11 months ago
(2009-04-07 20:21:10 UTC)
#2
The approach looks good to me (wasn't aware of the new remote api). One
question: for codereview.appspot.com and Chromium's instance, we have over 1000
accounts, so I don't know if the fetch() will work..
On 2009/04/07 20:21:10, JohnA wrote: > The approach looks good to me (wasn't aware of ...
14 years, 11 months ago
(2009-04-08 07:18:38 UTC)
#3
On 2009/04/07 20:21:10, JohnA wrote:
> The approach looks good to me (wasn't aware of the new remote api). One
> question: for codereview.appspot.com and Chromium's instance, we have over
1000
> accounts, so I don't know if the fetch() will work..
fetch_accounts() in update_accounts.py retrieves up to 100 entities until all
entities are fetched from the remote datastore. This script runs locally so all
entities are in local memory.
When the modified accounts are written back to the datastore in line 58, there
shouldn't be too much entities as I don't expect much duplicates.
On 2009/04/08 07:18:38, Andi Albrecht wrote: > On 2009/04/07 20:21:10, JohnA wrote: > > The ...
14 years, 11 months ago
(2009-04-16 11:21:00 UTC)
#4
On 2009/04/08 07:18:38, Andi Albrecht wrote:
> On 2009/04/07 20:21:10, JohnA wrote:
> > The approach looks good to me (wasn't aware of the new remote api). One
> > question: for codereview.appspot.com and Chromium's instance, we have over
> 1000
> > accounts, so I don't know if the fetch() will work..
>
> fetch_accounts() in update_accounts.py retrieves up to 100 entities until all
> entities are fetched from the remote datastore. This script runs locally so
all
> entities are in local memory.
>
> When the modified accounts are written back to the datastore in line 58, there
> shouldn't be too much entities as I don't expect much duplicates.
Committed r410.
http://codereview.appspot.com/28159/diff/1/5 File codereview/views.py (right): http://codereview.appspot.com/28159/diff/1/5#newcode1141 Line 1141: db_email = db.Email(accounts[0].user.email().lower()) This bug was fixed in ...
14 years, 11 months ago
(2009-04-16 11:28:15 UTC)
#5
Issue 28159: Nickname validation and removal of duplicates (issue99).
(Closed)
Created 15 years ago by Andi
Modified 11 years, 8 months ago
Reviewers: GvR, JohnA
Base URL:
Comments: 2