Package: texsite
texsitetexsite delivers great and ready-to-use page templates for the modern, flexible and user-focused web content management systemWagtail CMSbacked by the popularDjango web framework, both written inPython.Based on the amazingStreamFieldintroduced with Wagtail release 1.0, which texsite uses extensively, it has never been easier for editors to author awesome pages. Read more on how this concept works in the great blog articleRich text fields and faster horseswritten by Matt Westcott, lead technical developer of Wagtail.FeaturesClean Blog Pages - based on theClean Blogtheme by Start BootstrapBusiness Casual Pages - based on theBusiness Casualtheme by Start BootstrapOutstanding test coverageContinuously integrated codebaseTechnical requirementsNew feature releases frequently add support for newer versions of underlying technologies and drop support for older ones. The compatible versions of Wagtail, Django and Python for each texsite release are:ReleaseWagtailDjangoPython4.0+4.1 LTS3.2 LTS3.8, 3.9, 3.10, 3.113.02.11 LTS3.13.82.02.7 LTS2.2 LTS3.6, 3.7, 3.81.02.3 LTS1.11 LTS3.4. 3.5, 3.6Code and contributionThe code is open source and released under theISC License (ISCL). It is available onGitlaband follows the guidelines aboutSemantic Versioningfor transparency within the release cycle and backward compatibility whenever possible.All contributions are welcome, whether bug reports, code contributions and reviews, documentation or feature requests.If you're a developer, fork the repo and prepare a merge request:# Prepare your environment the first timepython3.8venv~/virtualenvs/texsite-py38
pipinstall-e.[development]# Running the tests while developmentpython-mdjangotest--settings=tests.settings# Individual supported versions tests and code quality checkstox-epy38-dj22-wt27
tox-eisort
tox-ebrunette
tox-eflake8# Ensure code quality running the entire test suite,# this requires all supported Python releases to be installedtox# On created, changed or deleted translations...# ...update the message files within the respective apps directorypython-mdjangomakemessages--all# ...edit and translate the message files manually# ...compile the message filespython-mdjangocompilemessagesInstallationInstalltexsitedirectly fromPyPIusing pip:pipinstalltexsiteConfigurationEnvironmentThe tool only requires one environment variable to work properly:TEXSITE_DATA_ROOTThis path is used to store:Uploaded user content such as images and documentsCollected static files for the web application frontendEnvironment specific application configurationFor example set this environment variable in a bash to a valid directory path:exportTEXSITE_DATA_ROOT="$HOME/data/texsite"Django settingsOn startup the application loads a modulelocalsettingswhere you may provide environment specific Django settings, e.g. a database service.It searches with thesys.pathand first adds the path configured in the environment variableTEXSITE_DATA_ROOT.DockerWe provide production-ready Docker images for our entrypoints.TagsThe images are built using ourGitLab pipelinesand hosted within a publicGitLab container registry. Our established pipeline recipe (borrowed fromcallr) ensuresthelatesttag is up-to-date with themasterbranch andevery Git tag (e.g.v4.1.0) has also a corresponding Docker image tag.ImagesThe following images are available:texsite/cli: use the Django and Wagtail management commands (django-admin)texsite/web: serve the Django WSGI application (without serving static and media files)UsageFor the command line interface simply prepend thedocker runcommand and its options before regulardjango-admincommands:# Prepend `docker run` and its optionsdockerrun\--nametexsite-cli\--rm\--interactive\--tty\--envDJANGO_SETTINGS_MODULE=texsite.settings.[dev|production]\--envTEXSITE_DATA_ROOT=/texsite-data-root\--volume~/data/texsite:/texsite-data-root\texsite/cli\# Use regular Django management commands[collectstatic|createsuperuser|migrate|...]--settings=texsite.settings.[dev|production]The web application image runs the Django WSGI application usinggunicornas application server. It can be launched as follows:dockerrun\--nametexsite-web\--rm\--detach\--envDJANGO_SETTINGS_MODULE=texsite.settings.[dev|production]\--envTEXSITE_DATA_ROOT=/texsite-data-root\--volume~/data/texsite:/texsite-data-root\--publish5000:5000\texsite/webComposeFor local testing and development purposes a predefined Docker compose file is available.After code changes the images have to be rebuilt withdocker compose build.To start all services executedocker compose up --detach --remove-orphansafter adapting the compose volumes to your local environment. This runs the following containers:our texsite WSGI applicationa nginx webserver serving static files and acting as reverse proxy for the applicationIn addition you can easily use thetexsite-clicontainer executing Django and Wagtail management commands:dockercomposerun--rm--publish8000:8000texsite-clirunserver0.0.0.0:8000
dockercomposerun--rmtexsite-climigrate
dockercomposerun--rmtexsite-clicreatesuperuser
dockercomposerun--rmtexsite-clicollectstatic