--
You received this message because you are subscribed to the Google Groups "Django users" group.
To post to this group, send email to django...@googlegroups.com.
To unsubscribe from this group, send email to django-users...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
Au contraire:
>>> from django.http import QueryDict
>>> QueryDict('id=1&id=2&id=3')
<QueryDict: {u'id': [u'1', u'2', u'3']}>
Cheers
Tom
--
You received this message because you are subscribed to the Google Groups "Django users" group.
To post to this group, send email to django...@googlegroups.com.
To unsubscribe from this group, send email to django-users...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
Danger Will Robinson!
You are now departing from convention, or how everyone else does
things. Whilst this may work for a while, you will quickly get annoyed
that you cant do simple things easily, like generating URLs of that
format.
If your URL looks like this:
xxxxx?bla=1&bla=2&bla=3&bla=4
then you get your list of bla like so:
arr = request.GET.getlist('bla')
You can then regenerate your URL easily using a QueryDict:
>>> from django.http import QueryDict
>>> q=QueryDict('', mutable=True)
>>> q.setlist('blah', ['1', '2', '3', '4'])
>>> q.urlencode()
'blah=1&blah=2&blah=3&blah=4'
However, you now can't do any of this, and will have to hand craft
your URLs, just because you don't like convention. Enjoy.
Cheers
Tom