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

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

MultiValueDict and cache

2007-09-03 Thread Doug B
ivalue 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 single list' In [14]: cache.set('mvd',m) In [15]: mc=cache.get('m

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 iteritems

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-10 Thread Adrian Holovaty
ow I can obtain list instead of string? 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 the docs for more info: http://www.djangoproject.com/documentation/request_response/#querydict-objects I

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

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

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

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]', '[EMAIL PROTECTED]', '[EMAIL PROTECTED]'], 'byuser': ['1']} now i´m trying to get all