0
0
mirror of https://github.com/wagtail/wagtail.git synced 2024-12-01 11:41:20 +01:00
wagtail/docs/contributing
David Beitey 67235accfc Improve database settings and docs for tests (#6585)
This change makes several improvements:

* Use in-memory SQLite database for test migrations

  The default database is SQLite but its NAME (which SQLite uses as the
  filename) was `wagtail`, which isn't valid since
  the wagtail codebase already has a `wagtail/` directory.  Trying to
  run migration creation commands
  (https://docs.wagtail.io/en/latest/contributing/developing.html#running-migrations-for-the-test-app-models)
  produced an error:

  django.db.utils.OperationalError: unable to open database file

  because of this conflict.

  This change uses an in-memory database as the default database for
  tests. If DATABASE_NAME were set to a real file name, then
  running the migration command with SQLite creates an empty db with
  this filename on running `django-admin`.

  Other non-SQLite engines continue to use the original `wagtail` name,
  meaning that the `test_wagtail` database gets created just as before.

* Modifies the default values for database USER, PASSWORD, HOST etc to
  being an empty string rather than None, to match Django's
  [defaults](https://docs.djangoproject.com/en/stable/ref/settings/#host).
  This helps avoid any potential issues when Django and database engines
  are expecting this being a string.

* Adds documentation to `developing.rst` regarding installation of
  required database modules and available environment variables for database
  connection customisation

* Normalises the DATABASE_PASSWORD tests environment variable to match
  the name in Django's database settings object
2020-12-09 15:28:44 +00:00
..
committing.rst Add section to explain commit to pull request 2020-05-19 17:56:26 +01:00
css_guidelines.rst General spelling fixes 2020-10-03 14:43:03 +01:00
developing.rst Improve database settings and docs for tests (#6585) 2020-12-09 15:28:44 +00:00
general_guidelines.rst Add guideline on the use of British vs American English 2018-06-27 20:39:08 +01:00
html_guidelines.rst Update links in documentation. (#5689) 2019-11-08 09:15:01 +00:00
index.rst Add documentation for reporting security issues 2020-04-20 11:57:26 +10:00
issue_tracking.rst General spelling fixes 2020-10-03 14:43:03 +01:00
javascript_guidelines.rst Update links in documentation. (#5689) 2019-11-08 09:15:01 +00:00
python_guidelines.rst Drop travis entirely 2020-11-05 12:04:12 +00:00
release_process.rst Lint docs with doc8 2020-10-03 14:43:03 +01:00
security.rst General spelling fixes 2020-10-03 14:43:03 +01:00
styleguide.rst Renamed wagtail.contrib.wagtailstyleguide to wagtail.contrib.styleguide 2017-11-26 22:43:47 +00:00