Metadata-Version: 2.4
Name: texsite
Version: 6.6.0
Project-URL: Homepage, https://www.texperience.de
Project-URL: Repository, https://gitlab.com/texperience/texsite
Author-email: Timo Rieber <trieber@texperience.de>
License: Copyright (c) 2016, Timo Rieber <trieber@texperience.de>
        
        Permission to use, copy, modify, and/or distribute this software for any
        purpose with or without fee is hereby granted, provided that the above
        copyright notice and this permission notice appear in all copies.
        
        THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
        WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
        MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
        ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
        WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
        ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
        OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
License-File: LICENSE
Classifier: Development Status :: 5 - Production/Stable
Classifier: Environment :: Web Environment
Classifier: Framework :: Django
Classifier: Framework :: Django :: 5.2
Classifier: Framework :: Wagtail
Classifier: Framework :: Wagtail :: 7
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: End Users/Desktop
Classifier: License :: OSI Approved :: ISC License (ISCL)
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Internet :: WWW/HTTP
Classifier: Topic :: Internet :: WWW/HTTP :: Dynamic Content
Requires-Python: <3.14,>=3.13
Requires-Dist: django<5.3,>=5.2
Requires-Dist: wagtail<7.1,>=7.0
Description-Content-Type: text/markdown

# texsite

[![Pipeline][pipeline-badge]][pipeline-link]
[![Coverage][coverage-badge]][coverage-link]
[![PyPI][pypi-badge]][pypi-link]
[![License][license-badge]][license-link]

[pipeline-badge]: https://gitlab.com/texperience/texsite/badges/master/pipeline.svg
[pipeline-link]: https://gitlab.com/texperience/texsite/pipelines
[coverage-badge]: https://gitlab.com/texperience/texsite/badges/master/coverage.svg
[coverage-link]: https://gitlab.com/texperience/texsite/-/jobs
[pypi-badge]: https://img.shields.io/pypi/v/texsite.svg
[pypi-link]: https://pypi.python.org/pypi/texsite
[license-badge]: https://img.shields.io/pypi/l/texsite.svg
[license-link]: http://en.wikipedia.org/wiki/ISC_license

texsite delivers great and ready-to-use page templates for the modern, flexible and user-focused web content management system [Wagtail CMS][wagtail] backed by the popular [Django web framework][django], both written in [Python][python].

Based on the amazing [StreamField][wagtail-streamfield] introduced 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 article [Rich text fields and faster horses][wagtail-rtfafh] written by Matt Westcott, lead technical developer of Wagtail.

[wagtail]: https://wagtail.io/
[django]: https://www.djangoproject.com/
[python]: https://www.python.org/
[wagtail-streamfield]: http://docs.wagtail.io/en/stable/topics/streamfield.html
[wagtail-rtfafh]: https://torchbox.com/blog/rich-text-fields-and-faster-horses/

## Features

- Themes:
  - [Clean Blog][startbootstrap-cleanblog]
  - [Business Casual][startbootstrap-businesscasual]
  - [Freelancer][startbootstrap-freelancer]
  - [Xperience][startbootstrap-personal]
  - [Serene][serene-brief]
  - [Agency][startbootstrap-agency]
- Outstanding test coverage
- Continuously integrated codebase

[startbootstrap-cleanblog]: https://startbootstrap.com/theme/clean-blog
[startbootstrap-businesscasual]: https://startbootstrap.com/theme/business-casual
[startbootstrap-freelancer]: https://startbootstrap.com/theme/freelancer
[startbootstrap-personal]: https://startbootstrap.com/theme/personal
[serene-brief]: docs/serene-style-brief.md
[startbootstrap-agency]: https://startbootstrap.com/theme/agency

## Technical requirements

New 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:

| Release | Wagtail  | Django   | Python                      |
| ------- | -------- | -------- | --------------------------- |
| 6.0+    | 7.0 LTS  | 5.2 LTS  | 3.13                        |
| 5.0+    | 6.3 LTS  | 4.2 LTS  | 3.9, 3.10, 3.11, 3.12, 3.13 |
| 4.0+    | 4.1 LTS  | 3.2 LTS  | 3.8, 3.9, 3.10, 3.11        |
| 3.0     | 2.11 LTS | 3.1      | 3.8                         |
| 2.0     | 2.7 LTS  | 2.2 LTS  | 3.6, 3.7, 3.8               |
| 1.0     | 2.3 LTS  | 1.11 LTS | 3.4, 3.5, 3.6               |

texsite only supports SQLite databases.

## Code and contribution

The code is open source and released under the [ISC License (ISCL)][isc-license]. It is available on [Gitlab][gitlab] and follows the guidelines about [Semantic Versioning][semver] for 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:

```bash
# Prepare your environment
uv sync
git config core.hooksPath .githooks

# Running tests
uv run python -m django test --settings=tests.settings

# Code quality
uv run ruff format texsite tests
uv run ruff check texsite tests

# Translations
uv run python -m django makemessages --all
uv run python -m django compilemessages
```

[isc-license]: http://en.wikipedia.org/wiki/ISC_license
[semver]: http://semver.org/
[gitlab]: https://gitlab.com/texperience/texsite

## Installation

Install `texsite` directly from [PyPI][pypi] using pip:

```bash
pip install texsite
```

[pypi]: https://pypi.org/project/texsite/

## Configuration

All configuration details can be found in `texsite/settings/config.py`. The available environment variables and their defaults are defined there.

We recommend using a `.env` file to set the environment variables. `manage.py` loads it automatically, and it is also recognised by Docker compose.

If you need more flexibility, you may provide your own settings module. This is done by setting the `DJANGO_SETTINGS_MODULE` environment variable to the path of your custom settings module.

## Local development

Run the development server locally without Docker:

```bash
cp .env.example .env
mkdir -p .data
uv run python manage.py migrate
uv run python manage.py createsuperuser
uv run python manage.py runserver 127.0.0.1:8000
```

See the Configuration section above for available environment variables.

## Docker

We provide a Dockerfile to build a production-ready image. Production routing lives outside this repository; `compose.yml` covers local development and pre-release testing — see it for services, ports and mounts.

```bash
docker compose run --rm cli migrate            # management commands run through `cli`
docker compose up                              # hot-reloading dev server
docker compose --profile release up --build    # prod-like image test
```

## Multi-Tenant Hosting

texsite supports multi-tenant hosting where a single instance serves multiple customer domains. Each tenant gets their own:

- Wagtail Site with custom root page
- Collection for media isolation
- User group with scoped permissions
- Site branding (logo/favicon) via Wagtail admin

### New Tenant Setup (Wagtail Admin)

1. **Create root page** under the Root page
2. **Create Wagtail Site** pointing to the new root page with correct hostname/port
3. **Create Collection** for tenant media (Images/Documents)
4. **Create Group** with permissions:
   - `add_page`, `change_page`, `publish_page` on root page
   - `add_image`, `change_image`, `choose_image` on collection
   - `add_document`, `change_document`, `choose_document` on collection
5. **Create users** and assign to the tenant group
6. **Configure SiteBranding** (Settings > Site branding)
