views:

250

answers:

1

hi,

I've got the following QueryDict object in my request.session.

<QueryDict: {u'category': [u'44', u'46'], u'cityID': [u'null'], u'countryCode': [u''], u'mapCenterLng': [u'2.291300800000009'], u'mapZoom': [u'12'], u'mapCenterLat': [u'47.10983460000001'], u'price_range': [u''], u'textbox': [u'']}>

In a template try to get the category array using:

{{request.session.lastrequest.category}}

but this gives me only the last value of the array. How can I get the entire array?

Thanks

Jul

+1  A: 

You can't. You need to call .getlist('category'), but you can't call methods with a parameter in a template.

Ignacio Vazquez-Abrams
Wow, fast reply. I'll find an alternative then. Thanks!
jul