settings.rst 2.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889
  1. .. _settings:
  2. Settings
  3. ========
  4. South has its own clutch of custom settings you can use to tweak its operation.
  5. As with normal Django settings, these go in ``settings.py``, or a variant thereof.
  6. SKIP_SOUTH_TESTS
  7. ----------------
  8. South has a somewhat fragile test suite, as it has to fiddle with
  9. ``INSTALLED_APPS`` at runtime to load in its own testing apps. If the South
  10. tests are failing for you, and you'd rather they be ignored
  11. (by your CI system or similar, in particlar) set this to ``True``.
  12. Defaults to ``False``.
  13. SOUTH_DATABASE_ADAPTER
  14. ----------------------
  15. *(Django 1.1 and below)*
  16. If set, overrides the database module South uses for generating DDL commands.
  17. Defaults to ``south.db.<DATABASE_ENGINE>``.
  18. SOUTH_DATABASE_ADAPTERS
  19. -----------------------
  20. *(Django 1.2 and above)*
  21. A dictionary with database aliases as keys and the database module South will
  22. use as values. South defaults to using the internal ``south.db.<ENGINE> modules``.
  23. DATABASE_STORAGE_ENGINE
  24. -----------------------
  25. Only for MySQL. If set, South will tell MySQL to use the given storage engine
  26. for new items.
  27. SOUTH_AUTO_FREEZE_APP
  28. ---------------------
  29. When set, South freezes a migration's app and appends it to the bottom of the
  30. migration file (the default behaviour, and required for ``--auto`` to work).
  31. If you want to manually pass in ``--freeze appname`` instead, or just don't
  32. like the clutter, set this to ``False``. Defaults to ``True``.
  33. SOUTH_TESTS_MIGRATE
  34. -------------------
  35. If this is ``False``, South's test runner integration will make the test
  36. database be created using syncdb, rather than via migrations (the default).
  37. Set this to ``False`` if you have migrations which take too long to migrate
  38. every time tests run, but be wary if you rely on migrations to do special things.
  39. Defaults to ``True`` in 0.7 and above, ``False`` in 0.6 and below.
  40. SOUTH_LOGGING_ON
  41. ----------------
  42. If this is True the SQL run by South is logged to a file.
  43. You must also set ``SOUTH_LOGGING_FILE`` to a valid file that you want to log to.
  44. SOUTH_LOGGING_FILE
  45. ------------------
  46. See SOUTH_LOGGING_ON for more info.
  47. A sample setting would be::
  48. SOUTH_LOGGING_FILE = os.path.join(os.path.dirname(__file__),"south.log")
  49. .. _setting-south-migration-modules:
  50. SOUTH_MIGRATION_MODULES
  51. -----------------------
  52. *(South 0.7 and higher)*
  53. A dictionary of alternative migration modules for apps. By default, apps look
  54. for their migrations in "<appname>.migrations", but you can override this here,
  55. if you have project-specific migrations sets.
  56. Example::
  57. SOUTH_MIGRATION_MODULES = {
  58. 'books': 'myproject.migrations.books',
  59. }