Re: Getting a 'too many values to unpack' error

2009-01-14 Thread Thomas Guettler
yourmodel.objects.filter(a) does not work since a seems to be a queryset. You need to use .filter(attribute=value) or something like this. BTW: Why do you do all the select_related() calls? Michael schrieb: > Hello, > Here is my code: > > filter = {} > if request.GET.get('color', '').isdigit():

Getting a 'too many values to unpack' error

2009-01-14 Thread Michael
Hello, Here is my code: filter = {} if request.GET.get('color', '').isdigit(): filter['color_cat'] = request.GET['color'] if request.GET.get('origin', '').isdigit(): filter['collection__origin'] = request.GET['origin'] styles = Style.objects.select_related().filter(**filter).disti

Re: Too many values to unpack error

2008-07-10 Thread Fernando Rodríguez
El mié, 09-07-2008 a las 09:35 -0500, Arien escribió: > > TOPIC_CHOICES = ( ('general', 'General enquiry'), > > ('bug', 'Bug report'), > > ('suggestion' 'Suggestion'), > > ) > > You're missing a comma in the last-but-one line. (It evaluates to

Re: Too many values to unpack error

2008-07-09 Thread Arien
On Wed, Jul 9, 2008 at 9:27 AM, Fernando Rodríguez <[EMAIL PROTECTED]> wrote: > > Hi, > > I'm getting this error while calling .as_table() on a form. This is how > I define the form and the view function: > > from django import newforms as forms > > TOPIC_CHOICES = ( ('general', 'General enquiry')

Re: Too many values to unpack error

2008-07-09 Thread rui
Looks like you are following the djangobook, so check if your view is like: Contact us Contact us {{ form.as_table }} Cheers. -- Rui --~--~-~--~~~---~--~~ You received this message because you are s

Too many values to unpack error

2008-07-09 Thread Fernando Rodríguez
Hi, I'm getting this error while calling .as_table() on a form. This is how I define the form and the view function: from django import newforms as forms TOPIC_CHOICES = ( ('general', 'General enquiry'), ('bug', 'Bug report'), ('suggestion' 'Suggestion'),