Re: Dictionary lookup with variable in template

2007-04-15 Thread anders conbere
This is so easily taken care of by a filter, I'm not sure if it's worth the trouble of introducing to the core syntax. @register.filter def objIndex(value, arg): "Use objects as keys in dictionaries {{ my_dict|objIndex:Value }}" return value[arg] for example, is probably

Re: Make copies of object: discussion for ticket #4027

2007-04-14 Thread anders conbere
On 4/14/07, Marek Kubica <[EMAIL PROTECTED]> wrote: > > Hi all, > > some days ago I had a problem: I needed to copy some objects from the > database preserving their values (and changing only one field). In #django > someone told me that this can be archived easily by setting the primary > key to

Re: required=True in newforms Fields does not result in an change in as_p

2007-04-12 Thread anders conbere
as a duplicate. > > http://code.djangoproject.com/ticket/3512 > > anders conbere wrote: > > ugh.. forgot to include a link to the ticket I made with my patch in it. > > > > http://code.djangoproject.com/ticket/4024 > > > > > > > > > -- > Waylan Limberg &

Re: required=True in newforms Fields does not result in an change in as_p

2007-04-12 Thread anders conbere
ugh.. forgot to include a link to the ticket I made with my patch in it. http://code.djangoproject.com/ticket/4024 --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django developers" group. To post to this group, se

required=True in newforms Fields does not result in an change in as_p

2007-04-12 Thread anders conbere
I noticed this today when writing some forms, and whipped up a quick patch. It could probably use one or two more eyes to look at it. a) so it doesn't get lost, b) to come up with some better variable names. The problem is pretty simple, as_p, as_ul and as_table, don't include an option to pass c