Hi there, I am having a puzzling issue with something that should be pretty straightforward. I have a variable called "sznames" which results from a .values() request performed on a queryset.
This "sznames" variable is successfully filled with dictionaries - three dictionaries in the test I am running. When i try to access those dictionaries with sznames[0], sznames[1] and sznames[2], the dictionary returned is not the right one: let's assume: sznames contains [{'mykey': valueA}, {'mykey': valueB}, {'mykey': valueC}] then: sznames[0] returns {'mykey': valueC} sznames[1] returns {'mykey': valueB} sznames[2] returns {'mykey': valueC} If it helps, the actual values for those variables are the following: sznames: [{'nwlat': Decimal("45.8467385274261100000000000"), 'swlat': Decimal("45.8443469581814200000000000"), 'id': 1, 'userid_id': 1, 'zonename': u'test', 'nwlong': Decimal("5.7806968688964840000000000"), 'nelong': Decimal("5.7863616943359375000000000")}, {'nwlat': Decimal ("51.5501980096159800000000000"), 'swlat': Decimal ("51.5493173632779360000000000"), 'id': 2, 'userid_id': 1, 'zonename': u'Test2', 'nwlong': Decimal("-0.2147483825683593800000000"), 'nelong': Decimal("-0.2120769023895263700000000")}, {'nwlat': Decimal ("48.8709535113221700000000000"), 'swlat': Decimal ("48.8691045512791650000000000"), 'id': 3, 'userid_id': 1, 'zonename': u'opera', 'nwlong': Decimal("2.3317193984985350000000000"), 'nelong': Decimal("2.3346161842346190000000000")}] sznames[0]: {'id': 3, 'nelong': Decimal ("2.3346161842346190000000000"), 'nwlat': Decimal ("48.8709535113221700000000000"), 'nwlong': Decimal ("2.3317193984985350000000000"), 'swlat': Decimal ("48.8691045512791650000000000"), 'userid_id': 1, 'zonename': u'opera'} sznames[1]: {'id': 2, 'nelong': Decimal ("-0.2120769023895263700000000"), 'nwlat': Decimal ("51.5501980096159800000000000"), 'nwlong': Decimal ("-0.2147483825683593800000000"), 'swlat': Decimal ("51.5493173632779360000000000"), 'userid_id': 1, 'zonename': u'Test2'} sznames[2]: {'id': 3, 'nelong': Decimal ("2.3346161842346190000000000"), 'nwlat': Decimal ("48.8709535113221700000000000"), 'nwlong': Decimal ("2.3317193984985350000000000"), 'swlat': Decimal ("48.8691045512791650000000000"), 'userid_id': 1, 'zonename': u'opera'} Any idea of what i am doing wrong? --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~----------~----~----~----~------~----~------~--~---