Skip to main content

pypi build coverage

An opinionated Django setup bundled as a Divio Cloud addon.

This package will auto configure Django, including admin and some other basic packages. It also handles sane configuration of the database connection and static and media files.

The goal is to keep the footprint inside the Django website project as small as possible, so updating things usually just means bumping a version in requirements.txt and no other changes in the project.

This addon still uses the legacy “Aldryn” naming. You can read more about this in our support section.

Contributing

This is a an open-source project. We’ll be delighted to receive your feedback in the form of issues and pull requests. Before submitting your pull request, please review our contribution guidelines.

We’re grateful to all contributors who have helped create and maintain this package. Contributors are listed at the contributors section.

Documentation

See REQUIREMENTS in the setup.py file for additional dependencies:

python django

Installation

Nothing to do. aldryn-django is part of the Divio Cloud platform.

For a manual install:

Add aldryn-django to your projects requirements.txt or pip install it.

The version is made up of the Django release with an added digit for the release version of this package itself.

If you followed the aldryn-addons installation instructions, you should already have a ALDRYN_ADDONS setting. Add aldryn-django to it:

INSTALLED_ADDONS = [
    'aldryn-django',
]

Create the addons/aldryn-django directory at the same level as your manage.py. Then copy addon.json, aldryn_config.py from the matching sourcecode into it.

Also create a settings.json file in the same directory with the following content:

{
    "languages": "[\"en\", \"de\"]"
}

Configuration

aldryn-django comes with entrypoints for manage.py and wsgi.py. This makes it possible to just have a small snippet of code in the website project that should never change inside those files. The details of local project setup (e.g reading environment variables from a .env file) are then up to the currently installed version of aldryn-django. Also other opinionated things can be done, like using a production-grade wsgi middleware to serve static and media files.

Put this in manage.py:

#!/usr/bin/env python
import os
from aldryn_django import startup


if __name__ == "__main__":
    startup.manage(path=os.path.dirname(os.path.abspath(__file__)))

put this in wsgi.py:

import os
from aldryn_django import startup


application = startup.wsgi(path=os.path.dirname(__file__))

APIs

Migrations

To run migrations, call the command aldryn-django migrate. This will run a series of commands for the migration stage of a project.

aldryn-django will run python manage.py migrate. But any addon can add stuff to this migration step by appending commands to the MIGRATION_COMMANDS setting. For example aldryn-cms (django-cms as an Addon) will run python manage.py cms fix-tree at the migration stage.

Production Server

Calling aldryn-django web will start an opinionated Django setup for production (currently uWSGI based).

Running Tests

You can run tests by executing:

virtualenv env
source env/bin/activate
pip install -r tests/requirements.txt
python setup.py test

Release files for aldryn-django 5.1.5.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for aldryn-django 5.1.5.0
File Size Uploaded
aldryn-django-5.1.5.0.tar.gz 16.2 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for aldryn-django 5.1.5.0
File Interpreter ABI Platform
aldryn_django-5.1.5.0-py3-none-any.whl Python 3 none any Details

Total release size: 33.8 kB

Release files / aldryn-django-5.1.5.0.tar.gz

Download URL aldryn-django-5.1.5.0.tar.gz
Size 16.2 kB
Tags Source
SHA-256 checksum
How to use checksums
c271d24593f799654777570559cbd2c692fafb75504e2210e914ceb1b813bf2e
BLAKE2b-256 checksum
How to use checksums
27152c9d76de5e57ccfb21adbd19b5e102769dd7653bfcb4a9e327428a5d2b61
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.0.0 CPython/3.9.18

Release files / aldryn_django-5.1.5.0-py3-none-any.whl

Download URL aldryn_django-5.1.5.0-py3-none-any.whl
Size 17.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
05aa4e3fe65de3106af815c4e81523c9c9f08d82f9e3a771da14ce0f9c32444e
BLAKE2b-256 checksum
How to use checksums
44d601bd806782d5791d94b41671ccbe35cccbdcd9557b5ba8fbb7ac66d05ff8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.0.0 CPython/3.9.18

Release history Release notifications | RSS feed

This release

5.1.5.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page