Re: Can I loop over attributes in model.attribute?

2008-06-11 Thread Johannes Dollinger
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

Re: order_by foreign key problem

2008-05-29 Thread Johannes Dollinger
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

Re: order_by foreign key problem

2008-05-29 Thread Johannes Dollinger
> 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

Re: Use variables inside an 'include' tag (and/or: how to set a variable in a template)

2008-05-29 Thread Johannes Dollinger
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