not be the most elegant solution. I'll look into the
Manager implementation as you suggested.
Thanks.
On Jul 27, 5:50 pm, bruno desthuilliers
wrote:
> On 27 juil, 06:27, gs794 wrote:
>
>
>
> > Hi all,
>
> > I'm having trouble overriding QuerySet.none()
Hi all,
I'm having trouble overriding QuerySet.none() (code below)... Works
if I rename the method to almost anything but "none".
class QuerySetManager(models.Manager):
def get_query_set(self):
return self.model.QuerySet(self.model)
def __getattr__(self, name):
return getattr(self.ge
The query it produces is pretty close to what you'd expect though -
apart from the extra column. The reason i'd like it to work is
because i'm applying filters based on context using some complicated
logic that sometimes applies the "none" method. Should I ticket this?
In terms of a quick hack, d
Hi all,
Just came across this error.
class Test(models.Model):
name = models.CharField(max_length=20)
test = Test(name='bob')
test.save()
pks = Test.objects.none().values('pk').query
print Test.objects.exclude(pk__in=pks)
DatabaseError: subquery has too many columns
The query:
SELECT
"err
4 matches
Mail list logo