Re: If Statements inside For Loops

2010-01-11 Thread G B Smith
If the docs are to be believed, {% ifequal %} does provide an option for an {% else %} clause. See http://docs.djangoproject.com/en/dev/ref/templates/builtins/#ifequal That said, I can't tell from the code above why it would not work. But if you are using Django dev version (post 1.1) then go for

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

2010-01-11 Thread G B Smith
gt; > 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 varchar field within Django. ? > > > On Jan 10, 2:29 am

Re: Django Groups In Templates

2010-01-10 Thread G B Smith
If your users can belong to only one group, then check this out: - http://stackoverflow.com/questions/1889607/django-middleware-to-determine-users-group-in-a-session GBS. On Jan 10, 1:21 pm, Dave Merwin wrote: > Brilliant!! That worked. Thanks. > > On Jan 10, 12:19 am, G B Smi

Re: Django Groups In Templates

2010-01-10 Thread G B Smith
user.groups.all returns not one but (possibly) many objects. Thus you will have to do something like {% for group in user.groups.all %} {% if group.name == 'subscribed' %} Hello {% endif %} {% endfor %} Regards, GBS On Jan 10, 1:12 pm, Dave Merwin wrote: > I'm trying to do somet

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: > > > Thank

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

2010-01-09 Thread G B Smith
ith the use of > signals.post_syncdb.  An adaptation the technique discussed here > <http://onebiglibrary.net/story/automatically-create-mysql-fulltext-in... > > > to alter your column might do the trick. > > On Jan 8, 10:24 pm, G B Smith wrote: > > > I now realize that primary=Tr

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

2010-01-08 Thread G B Smith
cally increment. On Jan 9, 10:21 am, G B Smith wrote: > 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

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

2010-01-08 Thread G B Smith
contrib.admin or elsewhere). On Jan 9, 4:06 am, Rolando Espinoza La Fuente wrote: > 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/msg211... > > On Fri, Jan 8, 2010

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