Dictionary lookup with variable in template

2007-04-14 Thread tsuraan
So, we have the four basic things that a "dot" can imply in a template: dictionary lookup, attribute lookup, method call, and list-index. What I needed was dictionary lookup on the context's value for the given field, rather the literal field. An example might help: >>> import django.template a

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: #3527 - better debug traceback with code executing...

2007-04-14 Thread Marek Kubica
Hi, I'm bringing this question up again, as no decision has been made. The current state is: - A AJAXy debugger could be useful. Some other frameworks have a debugger, so it's not a useless gimmick. - Having a debugger in the traceback is dangerous. We all agree - Having the debugger enabl

New edit_inline-like option: popup: discussion for ticket #4028

2007-04-14 Thread Marek Kubica
Hi all (again), While managing my objects in the Django admin, I can add new objects in related fields using the (+) button which is very handy, so I don't have to open another tab, just to create a new object of some other type. The Django, admin even supports inline-editing which is nice as wel

ModelChoiceField causes mod_python error

2007-04-14 Thread joe4444
Just recently I learned of ModelChoiceField, which seems like a great shortcut for a ChoiceField with choices=get_foo_choices(). When I replace a regular ChoiceField with ModelChoiceField it displays the select widget with the proper choices. However, submitting the form produces this traceback:

Make copies of object: discussion for ticket #4027

2007-04-14 Thread Marek Kubica
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 None and saving. It worked well. But some days later I realized t