mirror of
https://github.com/django/django.git
synced 2024-12-22 17:16:24 +00:00
Removed question marks from headings in docs/topics/db/fixtures.txt.
This commit is contained in:
parent
2f6b096b83
commit
871e1ee5ff
@ -4,28 +4,25 @@
|
|||||||
Fixtures
|
Fixtures
|
||||||
========
|
========
|
||||||
|
|
||||||
.. seealso::
|
|
||||||
|
|
||||||
* :doc:`/howto/initial-data`
|
|
||||||
|
|
||||||
What is a fixture?
|
|
||||||
==================
|
|
||||||
|
|
||||||
A *fixture* is a collection of files that contain the serialized contents of
|
A *fixture* is a collection of files that contain the serialized contents of
|
||||||
the database. Each fixture has a unique name, and the files that comprise the
|
the database. Each fixture has a unique name, and the files that comprise the
|
||||||
fixture can be distributed over multiple directories, in multiple applications.
|
fixture can be distributed over multiple directories, in multiple applications.
|
||||||
|
|
||||||
How to produce a fixture?
|
.. seealso::
|
||||||
=========================
|
|
||||||
|
* :doc:`/howto/initial-data`
|
||||||
|
|
||||||
|
How to produce a fixture
|
||||||
|
========================
|
||||||
|
|
||||||
Fixtures can be generated by :djadmin:`manage.py dumpdata <dumpdata>`. It's
|
Fixtures can be generated by :djadmin:`manage.py dumpdata <dumpdata>`. It's
|
||||||
also possible to generate custom fixtures by directly using :doc:`serialization
|
also possible to generate custom fixtures by directly using :doc:`serialization
|
||||||
tools </topics/serialization>` or even by handwriting them.
|
tools </topics/serialization>` or even by handwriting them.
|
||||||
|
|
||||||
How to use a fixture?
|
How to use a fixture
|
||||||
=====================
|
====================
|
||||||
|
|
||||||
Fixtures can be used to pre-populate database with data for
|
Fixtures can be used to pre-populate the database with data for
|
||||||
:ref:`tests <topics-testing-fixtures>`:
|
:ref:`tests <topics-testing-fixtures>`:
|
||||||
|
|
||||||
.. code-block:: python
|
.. code-block:: python
|
||||||
@ -40,8 +37,8 @@ or to provide some :ref:`initial data <initial-data-via-fixtures>` using the
|
|||||||
|
|
||||||
django-admin loaddata <fixture label>
|
django-admin loaddata <fixture label>
|
||||||
|
|
||||||
Where Django looks for fixtures?
|
How fixtures are discovered
|
||||||
================================
|
===========================
|
||||||
|
|
||||||
Django will search in these locations for fixtures:
|
Django will search in these locations for fixtures:
|
||||||
|
|
||||||
@ -116,8 +113,8 @@ example).
|
|||||||
|
|
||||||
.. _MySQL: https://dev.mysql.com/doc/refman/en/constraint-foreign-key.html
|
.. _MySQL: https://dev.mysql.com/doc/refman/en/constraint-foreign-key.html
|
||||||
|
|
||||||
How fixtures are saved to the database?
|
How fixtures are saved to the database
|
||||||
=======================================
|
======================================
|
||||||
|
|
||||||
When fixture files are processed, the data is saved to the database as is.
|
When fixture files are processed, the data is saved to the database as is.
|
||||||
Model defined :meth:`~django.db.models.Model.save` methods are not called, and
|
Model defined :meth:`~django.db.models.Model.save` methods are not called, and
|
||||||
|
Loading…
Reference in New Issue
Block a user