0
0
mirror of https://github.com/wagtail/wagtail.git synced 2024-11-29 17:36:49 +01:00
wagtail/docs
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
..
_static Update editor manual images where they show the old edit/workflow admin views before revamp 2020-08-07 17:10:26 +01:00
advanced_topics Update third-party tutorials (#6622) 2020-12-09 10:58:50 +00:00
contributing Improve database settings and docs for tests (#6585) 2020-12-09 15:28:44 +00:00
editor_manual fix trailing whitespace 2020-10-21 12:12:34 +01:00
getting_started Formalise support for Python 3.9 2020-11-02 17:29:58 +00:00
reference Allow customising image/document admin forms (#6462) 2020-12-09 12:35:19 +00:00
releases Allow customising image/document admin forms (#6462) 2020-12-09 12:35:19 +00:00
topics Release note for #6485 2020-12-08 18:23:56 +00:00
autobuild.sh
conf.py revert to @allcaps's original approach to including robots.txt 2020-12-04 13:30:55 +00:00
favicon.ico
index.rst
logo.png
Makefile Add config section for doc8 in setup.cfg and ignore _build dir 2020-10-21 12:39:32 +01:00
README.md Update links in documentation. (#5689) 2019-11-08 09:15:01 +00:00
requirements.txt
robots.txt revert to @allcaps's original approach to including robots.txt 2020-12-04 13:30:55 +00:00
spelling_wordlist.txt Add more names and jargon to spelling wordlist 2020-10-03 14:43:03 +01:00
support.rst Add documentation for reporting security issues 2020-04-20 11:57:26 +10:00

Wagtail docs

These are Sphinx docs, automatically built at https://docs.wagtail.io when the master branch is committed to Github. To build them locally, install Wagtail's development requirements (in the root Wagtail directory):

pip install -e .[testing,docs]

To build the documentation for browsing, from this directory run:

make html 

then open _build/html/index.html in a browser.

To rebuild automatically while editing the documentation, from this directory run:

sphinx-autobuild . _build

The online editor at http://rst.ninjs.org/ is a helpful tool for checking reStructuredText syntax.