Skip to main content
Archived

This project has been archived by its maintainers, and is no longer receiving any updates.

PyPI CI Codecov Supported Python versions License

Splash screen middleware for Django apps

Overview

Checks incoming requests, to redirect users to a configured splash screen URL if they don’t have the proper cookie set. This can be used to display a small marketing landing page, protect an alpha website from the public eye, make an announcement, etc.

Meant to be used with https://github.com/openedx/edx-platform/ – or you will need to import the config_models application to your Django application: https://github.com/openedx/django-config-models

Installation

Add the application to the INSTALLED_APPS:

python
INSTALLED_APPS = (
    ...
    # Splash screen
    'splash',
)

Add the middleware to the configuration:

python
MIDDLEWARE_CLASSES = (
    ...
    'splash.middleware.SplashMiddleware',
)

Run the migrations:

$ ./manage.py migrate splash

Then go to your Django admin, in http://yourserver/admin/splash/splashconfig/add/ and configure the following variables:

  • enabled: To activate the feature

  • cookie_name: The name of the cookie

  • cookie_allowed_values: The user cookie value must match one of the values to not be redirected to the splash screen URL

  • unaffected_users: Users which should never be redirected (usernames)

  • redirect_url: The URL the users should be redirected to when they don’t have the right cookie

License

The code in this repository is licensed under the Apache Software License 2.0 unless otherwise noted.

Please see LICENSE.txt for details.

How To Contribute

Contributions are very welcome.

Please read How To Contribute for details.

Reporting Security Issues

Please do not report security issues in public. Please email security@edx.org.

Getting Help

Have a question about this repository, or about Open edX in general? Please refer to this list of resources if you need any assistance.

Change Log

Unreleased

[1.3.0] - 2023-06-09

Added

  • Added Support for Django42.

[1.2.0] - 2022-01-26

Removed

  • Removed Support for Django22, 30, 31

Added

  • Added Support for Django40

[1.1.0] - 2021-07-09

Added

  • Support for django3.2

[0.2.2] - 2018-02-09

Added

  • Automatic upload to PyPI on tags.

[0.2.1] - 2018-02-07

Added

  • First release on PyPI.

Metadata

Release files for django-splash 1.3.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 django-splash 1.3.0
File Size Uploaded
django-splash-1.3.0.tar.gz 11.5 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for django-splash 1.3.0
File Interpreter ABI Platform
django_splash-1.3.0-py2.py3-none-any.whl Python 2, Python 3 none any Details

Total release size: 21.8 kB

Release files / django-splash-1.3.0.tar.gz

Download URL django-splash-1.3.0.tar.gz
Size 11.5 kB
Tags Source
SHA-256 checksum
How to use checksums
00de6f7115970f3446fe789574afdae4880a19bb5519215b06a71eb7acb1b102
BLAKE2b-256 checksum
How to use checksums
f5c518b670abf12670bb4189dc202368dbef67ba5c20c5cee87c622f4fc514c5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.9.17

Release files / django_splash-1.3.0-py2.py3-none-any.whl

Download URL django_splash-1.3.0-py2.py3-none-any.whl
Size 10.3 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
8008579f65525ea17c73580ce4288773e3b72148d5ddc573fc06893b53991042
BLAKE2b-256 checksum
How to use checksums
2be5b5bd6a042d75d0cf7c916ad84c0782bc3c0c08f50dc7a063a611ac9b3287
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.9.17
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