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():
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
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
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')
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
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'),
6 matches
Mail list logo