diff options
| author | Aymeric Augustin <aymeric.augustin@m4x.org> | 2013-12-28 09:53:02 +0100 |
|---|---|---|
| committer | Aymeric Augustin <aymeric.augustin@m4x.org> | 2013-12-28 09:53:02 +0100 |
| commit | c81fae6b9588ab9ef1edd7309c00e72a87154bc1 (patch) | |
| tree | c8674ce1fdeebb3bf88337289221e719362672b0 /docs/howto/initial-data.txt | |
| parent | a7add2f2965dac3c2f63b1459c8bde725250c977 (diff) | |
Used app_label instead of appname.
The last component of the dotted path to the application module is
consistently referenced as the application "label". For instance it's
AppConfig.label. appname could be confused with AppConfig.name, which is
the full dotted path.
Diffstat (limited to 'docs/howto/initial-data.txt')
| -rw-r--r-- | docs/howto/initial-data.txt | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/docs/howto/initial-data.txt b/docs/howto/initial-data.txt index 61885a0803..d003db6497 100644 --- a/docs/howto/initial-data.txt +++ b/docs/howto/initial-data.txt @@ -150,13 +150,13 @@ Database-backend-specific SQL data There's also a hook for backend-specific SQL data. For example, you can have separate initial-data files for PostgreSQL and SQLite. For each app, Django looks for a file called -``<appname>/sql/<modelname>.<backend>.sql``, where ``<appname>`` is +``<app_label>/sql/<modelname>.<backend>.sql``, where ``<app_label>`` is your app directory, ``<modelname>`` is the model's name in lowercase and ``<backend>`` is the last part of the module name provided for the :setting:`ENGINE <DATABASE-ENGINE>` in your settings file (e.g., if you have defined a database with an :setting:`ENGINE <DATABASE-ENGINE>` value of ``django.db.backends.sqlite3``, Django will look for -``<appname>/sql/<modelname>.sqlite3.sql``). +``<app_label>/sql/<modelname>.sqlite3.sql``). Backend-specific SQL data is executed before non-backend-specific SQL data. For example, if your app contains the files ``sql/person.sql`` |
