Debugging exceptions thrown by loaddata

2009-11-04 Thread Bram Duvigneau
Hi all, I'm trying to import a JSON fixture using loaddata. It gives me a ProgrammingError because it seems that it's trying to put to much data in a varchar. Without access to the variables in that scope, I'm quite lost which record is causing this. Using "python -i manage.py loaddata --tracebac

Working with inline formsets to created/edit an object

2008-09-18 Thread Bram Duvigneau
Hello, I've an object that has three associations that should be edited inline. I would like to let the user create this object and it's associations at one page. Same goes for editing the object. I've hacked something together using formsets, but I'm facing some problems. First of all, the c

Re: Rendering specific widgets of a MultiWidget

2008-05-02 Thread Bram Duvigneau
Thanks for the replies. I'm not really new to Django, but this is my first application that I'm really building with it. I never said that this should be in trunk or something, but if it will get in, I would prefer something more customizable. However, it seems that writing my own version that ju

Rendering specific widgets of a MultiWidget

2008-04-29 Thread Bram Duvigneau
Hello, I'm using the DurationField from http://gulopine.gamemusic.org/2007/nov/03/storing-passages-of-time/ This is working fine, but the included widget shows text fields for days, hours, minutes, seconds and microseconds. I would like to have hours:minutes. The best solution seems to be that I

Re: ModelForms: overwriting a field using parameters from the form constructor

2008-04-16 Thread Bram DUvigneau
Thanks, it works. I'm using this in the __init__ of my form, because I'm subclassing ModelForm. Bram Richard Dahl wrote: > You could do something like this: > > f = forms.form_for_model(modelname) > f.base_fields['fieldname'].queryset = (query_based_on_variable) > > I automatically do this