mirror of
https://github.com/wagtail/wagtail.git
synced 2024-11-29 17:36:49 +01:00
67235accfc
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 |
||
---|---|---|
.. | ||
_static | ||
advanced_topics | ||
contributing | ||
editor_manual | ||
getting_started | ||
reference | ||
releases | ||
topics | ||
autobuild.sh | ||
conf.py | ||
favicon.ico | ||
index.rst | ||
logo.png | ||
Makefile | ||
README.md | ||
requirements.txt | ||
robots.txt | ||
spelling_wordlist.txt | ||
support.rst |
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.