Re: create author before adding a book - edit form

2009-09-28 Thread Rochak Neupane
Alright, perhaps my description of the problem was not very clear. Hadn't gone back to it, but using "initial" when creating form solved the problem. On Wed, Sep 2, 2009 at 1:56 PM, Rochak Neupane wrote: > Taking the Book and Author example from > http://docs.djangoproj

create author before adding a book - edit form

2009-09-02 Thread Rochak Neupane
Taking the Book and Author example from http://docs.djangoproject.com/en/dev/topics/forms/modelforms/ When creating a book, I would like to add an author if no such author exists. I believe by default class BookForm(ModelForm): class Meta: model = Book displays "Author" as a drop

Re: ModelForm, foreignkey, and hidden fields is null

2009-06-17 Thread Rochak Neupane
just tried it out. worked perfectly. thanks! On Tue, Jun 16, 2009 at 3:18 PM, Rochak Neupane wrote: > ohh, thanks, Daniel! I like your way. and i don't even my to expose the > user_id in a form.I'll try that. > > > On Mon, Jun 15, 2009 at 10:55 PM, Daniel Roseman wrote

Re: ModelForm, foreignkey, and hidden fields is null

2009-06-16 Thread Rochak Neupane
ohh, thanks, Daniel! I like your way. and i don't even my to expose the user_id in a form.I'll try that. On Mon, Jun 15, 2009 at 10:55 PM, Daniel Roseman wrote: > > On Jun 16, 1:12 am, k-dj wrote: > > I'm just starting to use django and have run into a problem I have not > > been able to solve.