Ticket #15578: doc_patch.diff

File doc_patch.diff, 1.0 KB (added by trez, 13 years ago)

doc path for fixture ordering - maybe just a draft

  • initial-data.txt

     
    116116</ref/django-admin>`. Refer to the :doc:`manage.py documentation
    117117</ref/django-admin>` for more information.
    118118
    119 Note that if you have multiple SQL data files, there's no guarantee of
    120 the order in which they're executed. The only thing you can assume is
    121 that, by the time your custom data files are executed, all the
    122 database tables already will have been created.
     119SQL data files are executed in the same order than their ordering
     120in the fixtures.
    123121
     122For example:
     123
     124fixtures = ['foo','bar','baz']
     125foo will be executed first then bar, then baz.
     126
     127However, fixtures are not loaded for one application but for any
     128applications which contains this fixture.
     129
     130Therefore, you should also take into account the order in which application
     131are defined.
     132
     133
    124134.. admonition:: Initial SQL data and testing
    125135
    126136    This technique *cannot* be used to provide initial data for
Back to Top