On Wed, Nov 10, 2010 at 5:16 PM, octopusgrabbus
wrote:
> Thank you. This worked well.
> However, I'm left with this value
>
>
> How do I get that into a comparable form?
>
It sounds like you're getting the __unicode__() representation of your
model. If you want the data in the actual fields you'
Thank you. This worked well.
However, I'm left with this value
How do I get that into a comparable form?
On Nov 10, 4:06 pm, Łukasz Rekucki wrote:
> On 10 November 2010 21:55, Shawn Milochik wrote:
>
> > The queryset returns zero or more instances of your model. So if
> > there's only one resu
Łukasz,
Good and valid points. Thanks.
Shawn
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to
django-users+unsubscr...@googlegrou
On 10 November 2010 22:10, Shawn Milochik wrote:
> 2010/11/10 Łukasz Rekucki :
>> On 10 November 2010 21:55, Shawn Milochik wrote:
>>> The queryset returns zero or more instances of your model. So if
>>> there's only one result, you can just get the first item in the
>>> queryset by its index.
>>
2010/11/10 Łukasz Rekucki :
> On 10 November 2010 21:55, Shawn Milochik wrote:
>> The queryset returns zero or more instances of your model. So if
>> there's only one result, you can just get the first item in the
>> queryset by its index.
>>
>> For example:
>>
>> some_queryset = YourModel.objects
On 10 November 2010 21:55, Shawn Milochik wrote:
> The queryset returns zero or more instances of your model. So if
> there's only one result, you can just get the first item in the
> queryset by its index.
>
> For example:
>
> some_queryset = YourModel.objects.filter(**kwargs)
>
> if some_queryse
The queryset returns zero or more instances of your model. So if
there's only one result, you can just get the first item in the
queryset by its index.
For example:
some_queryset = YourModel.objects.filter(**kwargs)
if some_queryset.count() == 1:
x = some_queryset[0]
#x is now an instanc
This may not be the best way, but it works:
temp_ept_id = EptInv.objects.filter(inv_id=80581770).values_list()
and I got it from
http://docs.djangoproject.com/en/1.0/ref/models/querysets/
On Nov 10, 3:47 pm, octopusgrabbus wrote:
> My new model class works great. It returns my answer, but in
My new model class works great. It returns my answer, but in a query
set, and the table is set up only to return one element in the
QuerySet due to the indexes. My problem is how to extract the data
from that QuerySet. repr() does not work, because the model class has
no repr method.
How do I extr
9 matches
Mail list logo