Re: query with field name only known at runtime

2009-10-27 Thread James Harrison Fisher
a-HA. Simple. I had a suspicion this would be a python solution rather than Django-specific solution. Thanks! On Oct 27, 11:14 am, Daniel Roseman wrote: > On Oct 27, 10:48 am, James Harrison Fisher > wrote: > > > > > Hi, > > > I've recently

Re: query with field name only known at runtime

2009-10-27 Thread Daniel Roseman
On Oct 27, 10:48 am, James Harrison Fisher wrote: > Hi, > > I've recently come across something that's stumped me.  I am creating > a 'shortcut' function for easier creation of add/edit views.  This > function needs to make a query on a model in the simple form: > >

query with field name only known at runtime

2009-10-27 Thread James Harrison Fisher
Hi, I've recently come across something that's stumped me. I am creating a 'shortcut' function for easier creation of add/edit views. This function needs to make a query on a model in the simple form: model.objects.get(field_name=value) where the variables "model", "field_name", and "value"