Re: handle astronomically high number of users via the new BigIntegerField and contrib.auth.user

2010-01-11 Thread G B Smith
That's a good snippet, but I am sticking with django.contrib.auth.models.user.id = BigIntegerField(primary_key=True) for now. On Jan 10, 11:46 pm, Eric Chamberlain wrote: > We used one of the UUID fields from djangosnippets.org > . > > On Jan 9, 2010,

Re: handle astronomically high number of users via the new BigIntegerField and contrib.auth.user

2010-01-10 Thread Eric Chamberlain
We used one of the UUID fields from djangosnippets.org . On Jan 9, 2010, at 6:56 PM, G B Smith wrote: > Eric, could you explain how this UUID implementation was achieved? > Django doesn't have a built-in UUID, so I can only guess that you used > a v

Re: handle astronomically high number of users via the new BigIntegerField and contrib.auth.user

2010-01-10 Thread Frank DiRocco
I assume you could checksum some form of the user's object or "cleaned" form values and store it as unique attribute of the users. You would prolly have to override the clean method and add in valudation of the uniqueness and generate using an alternate method if the first does not validate

Re: handle astronomically high number of users via the new BigIntegerField and contrib.auth.user

2010-01-09 Thread G B Smith
Eric, could you explain how this UUID implementation was achieved? Django doesn't have a built-in UUID, so I can only guess that you used a varchar field within Django. ? On Jan 10, 2:29 am, Eric Chamberlain wrote: > On Jan 9, 2010, at 8:59 AM, G B Smith wrote: > > > Thanks, that is a good resour

Re: handle astronomically high number of users via the new BigIntegerField and contrib.auth.user

2010-01-09 Thread Eric Chamberlain
On Jan 9, 2010, at 8:59 AM, G B Smith wrote: > Thanks, that is a good resource. So this is what I am going to do : - > -- modify the contrib.auth.models.user to explicitly include id = > models.BigIntegerField(primary_key=True) > -- modify the contrib.auth.models.user.id field in the database usi

Re: handle astronomically high number of users via the new BigIntegerField and contrib.auth.user

2010-01-09 Thread G B Smith
Thanks, that is a good resource. So this is what I am going to do : - -- modify the contrib.auth.models.user to explicitly include id = models.BigIntegerField(primary_key=True) -- modify the contrib.auth.models.user.id field in the database using creecode's method above or via the mysql shell or ph

Re: handle astronomically high number of users via the new BigIntegerField and contrib.auth.user

2010-01-09 Thread creecode
Hello GBS, You might be able to accomplish this with the use of signals.post_syncdb. An adaptation the technique discussed here < http://onebiglibrary.net/story/automatically-create-mysql-fulltext-index-with-django-syncdb > to alter your column might do the trick. On Jan 8, 10:24 pm, G B Smith

Re: handle astronomically high number of users via the new BigIntegerField and contrib.auth.user

2010-01-08 Thread G B Smith
I now realize that primary=True is only one half of the problem. I could not find a way within Django to do something like autoincrement=True to go together with primary=True. At the moment it looks like I would need to go into the database (I'm using MySQL) and set the field to automatically incre

Re: handle astronomically high number of users via the new BigIntegerField and contrib.auth.user

2010-01-08 Thread G B Smith
Yes, I have read that thread. But since BigIntegerField is now available within Django, I would like to handle it from within Django itself. Thus I want to knowif changing the contrib.auth code to explicitly include a BigIntegerField primary key will have any side-effects (for example in contrib.a

Re: handle astronomically high number of users via the new BigIntegerField and contrib.auth.user

2010-01-08 Thread Rolando Espinoza La Fuente
An option is to just use ALTER TABLE.. command to change the column type. Regards, ref: http://www.mail-archive.com/django-develop...@googlegroups.com/msg21171.html On Fri, Jan 8, 2010 at 5:51 AM, G B Smith wrote: > Greetings, > > Let's say I know that the number of users of my app is going to

handle astronomically high number of users via the new BigIntegerField and contrib.auth.user

2010-01-08 Thread G B Smith
Greetings, Let's say I know that the number of users of my app is going to be very really really high. And let's also say I want to use the contrib.auth as it is so convenient. Is it okay if I simply change the code of django.contrib.auth.user to explicitly include an BigIntegerField called id an