This method returns the number of objects deleted and a dictionary with the number of deletions per object type.

For more details, including how to delete objects in bulk, see You can’t share pickles between versions Pickles of models are only valid for the version of Django that was used to generate them.

Since pickle compatibility errors can be difficult to diagnose, such as silently corrupted objects, a in a number of places.

Most notably, to display an object in the Django admin site and as the value inserted into a template when it displays an object.

No, other than it's probably not a PHP-related issue, since (if I understand correctly) it hasn't reached the PHP at the point that the error messages are triggered.

You might be better posting this in the Java Script area.

Thus, you should always return a nice, human-readable representation of the model from the The logic here is that if you change the URL structure of your objects, even for something simple such as correcting a spelling error, you don’t want to have to track down every place that the URL might be created. Both of these methods will perform their queries using the default manager for the model.

If you need to emulate filtering used by a custom manager, or want to perform one-off custom filtering, both methods also accept optional keyword arguments, which should be in the format described in .

If you assign auto-primary-key values manually, make sure not to use an already-existing primary-key value! Explicitly specifying auto-primary-key values is mostly useful for bulk-saving objects, when you’re confident you won’t have primary-key collision.

If you create a new object with an explicit primary-key value that already exists in the database, Django will assume you’re changing the existing record rather than creating a new one. If you’re using Postgre SQL, the sequence associated with the primary key might need to be updated; see The one gotcha here is that you should be careful not to specify a primary-key value explicitly when saving new objects, if you cannot guarantee the primary-key value is unused.

Note that when deferred fields are accessed, the loading of the deferred field’s value happens through this method.

Thus it is possible to customize the way deferred loading happens.

The example below shows how one can reload all of the instance’s fields when a deferred field is reloaded: This method should be used to provide custom model validation, and to modify attributes on your model if desired.