Re: iteration in MultiValueDict

2007-10-29 Thread schlam
nevermind, just being atwit --~--~-~--~~~---~--~~ 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 [EMA

Re: iteration in MultiValueDict

2007-10-29 Thread Karen Tracey
On 10/29/07, schlam <[EMAIL PROTECTED]> wrote: > > > using 0.96 am trying to iterate through a MultiValueDict using > > for i,j in MultiValueDict.items(): > print i, j > > is this a problem/feature/bug if so does someone know of a workaround? Is what a problem

iteration in MultiValueDict

2007-10-29 Thread schlam
using 0.96 am trying to iterate through a MultiValueDict using for i,j in MultiValueDict.items(): print i, j is this a problem/feature/bug if so does someone know of a workaround? --~--~-~--~~~---~--~~ You received this message because you are subscribed to

MultiValueDict and cache

2007-09-03 Thread Doug B
t AFTER fetching from the cache the multivalue list is now part of another list. list(list). Cache and fetch again and we have list(list(list)). Now it's just taunting me: In [11]: m=MultiValueDict() In [12]: m['Testing'] In [13]: m['Testing']='Single element in a s

How to get normal iteritems from a MultiValueDict?

2007-02-24 Thread Tomi Pieviläinen
While the __get__ function gives same results as a dict would, iteritems() doesn't. I'd like to use my GET/POST values in a function that uses iteritems, but it outputs even single values as lists. Is there a nice way to transform MultiValueDict into a normal dict, or the

How to get a model's MultiValueDict

2006-05-27 Thread Christian Schneider
the place.    new_data = place.__dict__however, when having a model with many-to-many and foreign-key-relationships I seem to need a MultiValueDict as the keys for the relations are not included in the dict. How can I get at such a MultiValueDict?T

Re: Bug in MultiValueDict?

2006-02-11 Thread Andrew Degtiariov
Hi Andrew,This isn't a bug -- it's intended behavior. When you access an element in a MultiValueDict, it returns the last item, as a string. See thedocs for more info:http://www.djangoproject.com/documentation/request_response/#querydict-objects If you want to get a list instead o

Re: Bug in MultiValueDict?

2006-02-10 Thread Adrian Holovaty
'3' > > There is regular string - last value from 'costs'. Don't know is it fixed > or not, if yes, could you give me patch or solution for Django 0.91 > how I can obtain list instead of string? Hi Andrew, This isn't a bug -- it's intended be

Bug in MultiValueDict?

2006-02-10 Thread Andrew Degtiariov
Hello! I'm using Django 0.91 and found some stranges related to MultiValueDict. Here is some code based on reciept from Django cookbook (manipulator related): class ServiceEdit(Manipulator): .     def complete(self, request, data):     debug('complete: %s' %repr(data)

Re: MultiValueDict

2005-12-28 Thread Adrian Holovaty
On 12/28/05, patrick k <[EMAIL PROTECTED]> wrote: > {'body': ['some body text'], 'project': ['1'], 'note': ['1'], 'user': > ['[EMAIL PROTECTED]', '[EMAIL PROTECTED]', '[EMAIL PROTECTED]'], > 'byuser': ['1']} > > now i´m trying to get all "users" to send them an email. > but with something like pos

Re: MultiValueDict

2005-12-28 Thread patrick k
thanks a lot. > > On 12/28/05, patrick k <[EMAIL PROTECTED]> wrote: >> now i´m trying to get all "users" to send them an email. >> but with something like post_data["user"] i only get "[EMAIL PROTECTED]". >> >> so, how can i get all the values for "user" within my dict? > > You might want to t

Re: MultiValueDict

2005-12-28 Thread James Bennett
On 12/28/05, patrick k <[EMAIL PROTECTED]> wrote: > now i´m trying to get all "users" to send them an email. > but with something like post_data["user"] i only get "[EMAIL PROTECTED]". > > so, how can i get all the values for "user" within my dict? You might want to take a look at Simon's respons

MultiValueDict

2005-12-28 Thread patrick k
i´m having some trouble with a MultiValueDict and hope that somebody can help me. my request.POST looks like this: {'body': ['some body text'], 'project': ['1'], 'note': ['1'], 'user': ['[EMAIL PROTECTED]', '