I got the answer on IRC that this is not a bug as explained in the
documentation for
include https://docs.djangoproject.com/en/1.8/ref/templates/builtins/#include
Suriya
On Thursday, September 10, 2015 at 2:55:42 PM UTC+5:30, Suriya Subramanian
wrote:
>
> Hi,
>
> I think there is
template is unable to override the block defined in the include file.
My understand is that, a file and block included within a parent template
should be considered a part of the parent. However, that does not seem to
be the case.
Thanks,
Suriya
--
You received this message because you
I found a way to express the second query in the ORM.
Person.objects.filter(sex='F', pk__in=tallest_people)
Thanks,
Suriya
On Monday, June 1, 2015 at 12:13:49 PM UTC+5:30, Suriya Subramanian wrote:
>
> I have a question about how order_by(), distinct(), and filter() interact.
> This
allest_in_their_city = [ p for p in tallest_people if (p in
tallest_females) ]
# Ideally, I'd like to write:
# Person.objects.order_by('city',
'-height').distinct('city').filter(sex='F').values_list('pk', flat=True)
What's a way to compute the results of the second query fully in the
databas
sqlparams = [ sqlparams_from_queryset(qs) for qs in querysets ]
(sqls, params) = zip(*sqlparams) # zip(*...) is the inverse of zip
params = tuple(itertools.chain.from_iterable(params))
cursor = connection.cursor()
cursor.execute(sqltemplate.format(*sqls), params)
return cur
and filtering).
Composing SQL and ORM, even if it means having to deal with the guts of
SQLCompiler.as_sql() seems to be a decent solution for me. I am asking if
there any best practices to follow or gotchas to watch out for.
Thanks,
Suriya
On Monday, May 4, 2015 at 5:35:50 AM UTC+5:30, Russell Ke
the complex query? What are some gotchas that I need to
watch out for?
Thanks,
Suriya Subramanian
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to dj
DavidA wrote:
> Suriya,
>
> You will probably have to do this in custom SQL or using extra(). Your
> query requires a subselect to get the "current B's" (B's with max(date)
> for each A).
>
> Here's the SQL that I think you need (if I understand the problem
> cor
o entries:
B(id=1, a=1, status=1, date=yesterday) and
B(id=2, a=1, status=0, date=today)
a = 1 should not be returned in the list, because the current
status is 0.
Suriya
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Goog
ValidAsManager does not return a
QuerySet. Could someone tell me what I can do to return
a QuerySet? How can I use the filter function to do so?
If you feel my schema is incorrect, I can consider
changing it.
Thanks,
Suriya
--~--~-~--~~~---~--~~
You rec
10 matches
Mail list logo