Re: Optimizing my ORM query

2009-03-06 Thread Sebastian Bauer
W dniu 06.03.2009 20:06, Jeff Gentry pisze: > On Fri, 6 Mar 2009, Malcolm Tredinnick wrote: > >>> Bob.objects.filter(foo=myFoo).filter(blah__in=myBlahs) >>> >> Seems like the best (and obvious) way to me. >> > > Gotcha. > > >> Yes it does. As written, your models have no

Re: Optimizing my ORM query

2009-03-06 Thread Sebastian Bauer
W dniu 06.03.2009 01:24, Malcolm Tredinnick pisze: > On Thu, 2009-03-05 at 18:48 -0500, Jeff Gentry wrote: > >> Suppose I have three models (in pseudocode): >> >> class Foo: >> asdf = models.CharField() >> >> class Blah: >> qwerty = models.CharField() >> >> class Bob: >> foo =

Re: Faster Database?

2009-02-25 Thread Sebastian Bauer
W dniu 25.02.2009 11:53, bruno desthuilliers pisze: > On 25 fév, 11:00, Sean wrote: > >> Hi, >> >> I am using django+MySql. >> My job involves to write a huge number of products codes into the >> MySql, code such as: ABCDEFGHI10, it is typically between 1 million up >>

Re: Dynamically changing q object

2009-01-26 Thread Sebastian Bauer
W dniu 26.01.2009 13:08, Stefan Tunsch pisze: > Hi! > > I have a qset object like this: > > qset = ( > Q(dst__contains=company.phone) | > Q(dst__contains=company.cellphone) | > Q(dst__contains=company.fax) | >

Re: Dynamically changing q object

2009-01-26 Thread Sebastian Bauer
W dniu 26.01.2009 13:08, Stefan Tunsch pisze: > Hi! > > I have a qset object like this: > > qset = ( > Q(dst__contains=company.phone) | > Q(dst__contains=company.cellphone) | > Q(dst__contains=company.fax) | >

Question about transaction middleware

2009-01-15 Thread Sebastian Bauer
Hi, i have one simple question, why this middleware leave transaction in managed mode? i think this create a little hole to execute queries we dont want to execute. Thanks for answer --~--~-~--~~~---~--~~ You received this message because you are subscribed to

license problem

2009-01-05 Thread Sebastian Bauer
Hello, i want to release some code, but i have one problem: how impel peoples to send me back patches? Any suggestions are welcome :) --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post

Re: Non-ASCII character - strange error

2008-11-19 Thread Sebastian Bauer
Try put: # -*- coding: utf-8 -*- in first line in .py file Maybe you need change utf-8 to your encoding Dominic Ashton pisze: > > Guys, > > > Just had the strangest thing happened. > > Finished working on my project last night and everything was working > fine. I backed up the directory using

Re: Why PostgreSQL?

2008-06-18 Thread Sebastian Bauer
i was using mysql for about 5y but now postgresql is better for me because of exclusive locks and full transactions support xhenxhe pisze: > Thanks for the info. So I guess I can just stick with MySQL since I > know it well... unless at some future date I find a compelling reason > to swtich to

Re: simple python math help.

2008-06-15 Thread Sebastian Bauer
size = [200.0, 400.0] return size[0]/size[1] Jarred Bishop pisze: > Hi, this is driving me crazy. I'm sure there is a VERY simple solution > but can't seem to find it. thanks for you help. > > if I have > > size = 200, 400 > return size[0]/size[1] > > it returns '0'. which isnt much

Re: OneToOneField

2008-06-13 Thread Sebastian Bauer
second is true, you need to use OnetOneField(Model,primary=True) to make field primary_key Juanjo Conti pisze: > Here > http://www.djangoproject.com/documentation/db-api/#one-to-one-relationships > says: > > ''' > The semantics of one-to-one relationships will be changing soon, so we > don't

Re: Django models - newbie question

2008-06-07 Thread Sebastian Bauer
ups i think return Teams.objects.get(self.team1_id).name will be better :) Sebastian Bauer pisze: > try this: > > return Teams.objects.get(self.team1).name > > > nikosk pisze: > >> Hi all >> >> Does anyone know how to do something like this : >&

Re: Django models - newbie question

2008-06-07 Thread Sebastian Bauer
try this: return Teams.objects.get(self.team1).name nikosk pisze: > Hi all > > Does anyone know how to do something like this : > > class Game(models.Model): > team1 = models.ForeignKey(Teams, related_name=u'team_home') > team2 = models.ForeignKey(Teams , related_name=u'team_away') >

Re: Tutorial, def __unicode__ not working

2008-06-03 Thread Sebastian Bauer
try: def __str__(self): return self.question [EMAIL PROTECTED] pisze: > http://www.djangoproject.com/documentation/tutorial01/ > > added these: > class Poll(models.Model): > # ... > def __unicode__(self): > return self.question > > class Choice(models.Model): > # ... >

Re: problem in remember me feature

2008-05-27 Thread Sebastian Bauer
did you have this: import settings in files where you using settings variable? Mayank Dhingra pisze: > any thoughts ? > > On May 27, 12:58 pm, Mayank Dhingra <[EMAIL PROTECTED]> wrote: > >> I am experiencing a strange problem while using >> DualSessionMiddleware >> >>