I've changed my code to:

    if request.POST:
        new_data = request.POST.copy()
        new_data['status_id'] = 2
        errors = manipulator.get_validation_errors(new_data)
        new_data['status_id'] = 2
        manipulator.do_html2python(new_data)
        new_data['status_id'] = 2
        keys = new_data.keys()
        #return HttpResponse("%s" % keys)
        #return HttpResponse("status_id = %s " % new_data['status_id'])
        #return HttpResponse("%s" % keys)
        #try:
        new_data = manipulator.save(new_data)
        #except OperationalError, inst:
        #    out = """ submission error %s """ % (new_data.keys())
        #    return HttpResponse(out)


and I still get an error saying that "status_id" cannot be null.

Perhaps the difference is that the example code you gave is an update,
not an insert?

Also, I don't pass a parameter to the manipulator like the example
does. I'm not sure what that does. But, it doesn appear to be related.

namaste,
Mark

On 10/11/06, nilkram <[EMAIL PROTECTED]> wrote:
>
> Hi,
>
> Check out the example at
> http://code.djangoproject.com/wiki/CookBookManipulatorWithPostpopulatedFields
>
> the main difference between that example and your code is that you
> should set the foreign key before calling get_validation_errors.
>
> Greetings,
>
> Fred van Dijk
>
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to