44Fixtures
55========
66
7- .. seealso::
8-
9- * :doc:`/howto/initial-data`
10-
11- What is a fixture?
12- ==================
13-
147A *fixture* is a collection of files that contain the serialized contents of
158the database. Each fixture has a unique name, and the files that comprise the
169fixture can be distributed over multiple directories, in multiple applications.
1710
18- How to produce a fixture?
19- =========================
11+ .. seealso::
12+
13+ * :doc:`/howto/initial-data`
14+
15+ How to produce a fixture
16+ ========================
2017
2118Fixtures can be generated by :djadmin:`manage.py dumpdata <dumpdata>`. It's
2219also possible to generate custom fixtures by directly using :doc:`serialization
2320tools </topics/serialization>` or even by handwriting them.
2421
25- How to use a fixture?
26- =====================
22+ How to use a fixture
23+ ====================
2724
28- Fixtures can be used to pre-populate database with data for
25+ Fixtures can be used to pre-populate the database with data for
2926:ref:`tests <topics-testing-fixtures>`:
3027
3128.. code-block:: python
@@ -40,8 +37,8 @@ or to provide some :ref:`initial data <initial-data-via-fixtures>` using the
4037
4138 django-admin loaddata <fixture label>
4239
43- Where Django looks for fixtures?
44- ================================
40+ How fixtures are discovered
41+ ===========================
4542
4643Django will search in these locations for fixtures:
4744
@@ -116,8 +113,8 @@ example).
116113
117114.. _MySQL: https://dev.mysql.com/doc/refman/en/constraint-foreign-key.html
118115
119- How fixtures are saved to the database?
120- =======================================
116+ How fixtures are saved to the database
117+ ======================================
121118
122119When fixture files are processed, the data is saved to the database as is.
123120Model defined :meth:`~django.db.models.Model.save` methods are not called, and
0 commit comments