You are looking for setattr(): http://docs.python.org/lib/built-in-
funcs.html#l2h-66
for attr in ('groupon', 'companyon', 'addressfirst', 'extendnames',
'clubfieldson'):
setattr(settings, attr, attr in data)
Am 12.06.2008 um 00:48 schrieb Wim Feijen:
>
> Thanks Russell!
>
> I suppose
Wah, nevermind ..
Am 30.05.2008 um 01:27 schrieb Johannes Dollinger:
>
>> Should this work??
>>
>> results = Gear.objects.select_related().order_by
>> (generic_info__hits)
>
> Quotes are missing:
>
> Gear.objects.select
> Should this work??
>
> results = Gear.objects.select_related().order_by(generic_info__hits)
Quotes are missing:
Gear.objects.select_related().order_by('generic_info__hits')
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the
You could use a filter:
@register.filter(name='concat')
def concat(value, arg):
return "%s%s" % (value, arg)
and then {% include dir|concat:"/tag.html" %}.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
4 matches
Mail list logo