Saturday, April 27, 2013

Re: check genre and insert

2013/4/27 Hélio Miranda <>
Made the proposed change, but what happens is that when will insert the movie with a genre that already exists to get the id of that genre, gives the following error: ObjectId ('517b15658774a7177cb1280d ') as the id that comes from this comes mongodb form.

When the genre does not exist and must enter the new genus, is not to enter.

Does anyone know what I'm doing wrong?

I don't know what your issue really is, but here's a quick debugging tip: add the following lines somewhere in your view:

import code

A Python interpreter will open in the same terminal where you're running the development server and you'll be able to do anything you want, inspect variables, query the database, you name it. Quit the interpreter (CTRL+D, don't use exit()) and the view will finish processing normally. It should help you finding where your assumptions are failing

You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
To post to this group, send email to
Visit this group at
For more options, visit

No comments:

Post a Comment