Thanks! That helped. Is your code working without error? It looks a lot like how I'm doing it.
Here's the error: Exception Type: KeyError Exception Value: Exception Location: /home/46538/data/python/django/django/forms/ models.py in save_existing_objects, line 294 cmiller On Aug 30, 2:11 am, patrickk <[EMAIL PROTECTED]> wrote: > here (http://dpaste.com/71450/) is an example for using > inlineformset_factory (see better_author_edit). don´t know if this is > much help though. > > maybe you can post your exact error-message. > > patrick. > > On Aug 30, 12:09 am, cmiller <[EMAIL PROTECTED]> wrote: > > > Hi All, > > > I have been hitting my head against a wall for way to long on this. > > > When I view it on the edit page everything looks great! But when I > > try to Save or Update, everything unravels. > > > I'm following it just the way the very sparse documentation suggests, > > and yet I get a "Exception Type: KeyError". I've tried it the way > > listed below and where "ff=BookFormSet(request.POST, instance=a)" and > > where I first put request.POST into a dictionary. Nothing works. Any > > help would be greatly appreciated. > > > author = request.session.get('author', None) > > a = Author.objects.get(id=author.id) > > BookFormSet = inlineformset_factory(Author, Books, extra=0) > > rf = BookFormSet(instance=a) > > > if request.method == 'POST': > > if request.POST['submit']=='Update': > > ff = BookFormSet(request.POST) > > if ff.is_valid(): > > instances = ff.save() > > return HttpResponseRedirect('/profile/books/view/') > > > Thanks! > > cmiller --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~----------~----~----~----~------~----~------~--~---