If I use variable names without quotes in "params[]", I get errors too.
My Python is 2.5. It does not have this string formatting feature. It's new in 2.6. On Jul 25, 6:58 am, Necmettin <[email protected]> wrote: > On 25 Temmuz, 02:23, David <[email protected]> wrote: > > > I used this syntax > > > .extra(where=['%s >= %s - %s'], params=['criteria1_metric1', > > 'criteria1_metric2', 'criteria1_value']) > > > however I got error. > > You seem to be using the variables' names as strings:>>> criteria1_metric1 = > 'somevalue' > >>> criteria1_metric1 > 'somevalue' > >>> 'criteria1_metric1' > > 'criteria1_metric1' --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~----------~----~----~----~------~----~------~--~---

