On Wed, Apr 15, 2009 at 5:39 PM, Justin Bronn wrote:
>
> > If it's docs links you want :) :
> >
> > http://docs.djangoproject.com/en/dev/faq/models/#how-can-i-see-the-ra...
>
> This isn't in the docs, but it also works:
>
> >>> qs = Foo.objects.all()
> >>> qs.query.as_sql()
>
> It returns a two-e
> If it's docs links you want :) :
>
> http://docs.djangoproject.com/en/dev/faq/models/#how-can-i-see-the-ra...
This isn't in the docs, but it also works:
>>> qs = Foo.objects.all()
>>> qs.query.as_sql()
It returns a two-element tuple comprised of the generated SQL and
parameters, respectively.
On Apr 15, 4:25 pm, Alex Gaynor wrote:
> On Wed, Apr 15, 2009 at 4:23 PM, Chris Curvey wrote:
>
> > I'm getting unexpected results from a database query that was
> > generated by Django, and I'm sure the problem is that I'm mis-using
> > the API. Is there a way to get Django to tell me what SQL
On Wed, Apr 15, 2009 at 4:23 PM, Chris Curvey wrote:
>
> I'm getting unexpected results from a database query that was
> generated by Django, and I'm sure the problem is that I'm mis-using
> the API. Is there a way to get Django to tell me what SQL was sent to
> the database server?
>
> (Sorry i
I'm getting unexpected results from a database query that was
generated by Django, and I'm sure the problem is that I'm mis-using
the API. Is there a way to get Django to tell me what SQL was sent to
the database server?
(Sorry if this is a FAQ, I've been looking for a while. Pointers to
docs g
5 matches
Mail list logo