These test that things behave sensibly for the rare corner-case of a model with
You can pass callable objects as the ``default`` parameter to a field. When
the object is created without an explicit value passed in, Django will call
Fixtures are a way of loading data into the database in bulk. Fixure data
can be stored in any serializable format (including JSON and XML). Fixtures
Generic relations let an object have a foreign key to any object through a
content-type/object-id field. A generic foreign key can point to any object,
get_object_or_404 is a shortcut function to be used in view functions for
performing a get() lookup and raising a Http404 exception if a DoesNotExist
get_or_create() does what it says: it tries to look up an object with the given
parameters. If an object isn't found, it creates one with the given parameters.
28. Many-to-many and many-to-one relationships to the same table
+. Many-to-many and many-to-one relationships to the same table
Make sure to set ``related_name`` if you use relationships to the same table.
27. Many-to-many relationships between the same two tables
+. Many-to-many relationships between the same two tables
In this example, A Person can have many friends, who are also people. Friendship is a
symmetrical relationship - if I am your friend, you are my friend.
26. Default manipulators
+. Default manipulators
Each model gets an AddManipulator and ChangeManipulator by default.
34. Generating HTML forms from models
+. Generating HTML forms from models
Django provides shortcuts for creating Form objects from a model class and a
``django.core.serializers`` provides interfaces to converting Django querysets
to and from "flat" data (i.e. strings).
39. Testing using the Test Client
+. Testing using the Test Client
The test client is a class that can act like a simple
browser for testing purposes.
This is an experimental feature!