django-splash
=============
|pypi-badge| |ci-badge| |codecov-badge| |pyversions-badge|
|license-badge|
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 <https://github.com/openedx/.github/blob/master/CONTRIBUTING.md>`_ 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.
.. _list of resources: https://open.edx.org/getting-help
.. |pypi-badge| image:: https://img.shields.io/pypi/v/django-splash.svg
:target: https://pypi.python.org/pypi/django-splash/
:alt: PyPI
.. |ci-badge| image:: https://github.com/openedx/django-splash/workflows/Python%20CI/badge.svg?branch=master
:target: https://github.com/openedx/django-splash/actions?query=workflow%3A%22Python+CI%22
:alt: CI
.. |codecov-badge| image:: http://codecov.io/github/edx/django-splash/coverage.svg?branch=master
:target: http://codecov.io/github/edx/django-splash?branch=master
:alt: Codecov
.. |pyversions-badge| image:: https://img.shields.io/pypi/pyversions/django-splash.svg
:target: https://pypi.python.org/pypi/django-splash/
:alt: Supported Python versions
.. |license-badge| image:: https://img.shields.io/github/license/edx/django-splash.svg
:target: https://github.com/openedx/django-splash/blob/master/LICENSE.txt
:alt: License
Change Log
----------
..
All enhancements and patches to django-splash will be documented
in this file. It adheres to the structure of http://keepachangelog.com/ ,
but in reStructuredText instead of Markdown (for ease of incorporation into
Sphinx documentation and the PyPI description).
This project adheres to Semantic Versioning (http://semver.org/).
.. There should always be an "Unreleased" section for changes pending release.
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.
Raw data
{
"_id": null,
"home_page": "https://github.com/openedx/django-splash",
"name": "django-splash",
"maintainer": "",
"docs_url": null,
"requires_python": "",
"maintainer_email": "",
"keywords": "Django edx",
"author": "edX",
"author_email": "oscm@edx.org",
"download_url": "https://files.pythonhosted.org/packages/f5/c5/18b670abf12670bb4189dc202368dbef67ba5c20c5cee87c622f4fc514c5/django-splash-1.3.0.tar.gz",
"platform": null,
"description": "django-splash\n=============\n\n|pypi-badge| |ci-badge| |codecov-badge| |pyversions-badge|\n|license-badge|\n\nSplash screen middleware for Django apps\n\nOverview\n--------\n\nChecks incoming requests, to redirect users to a configured splash screen URL\nif they don't have the proper cookie set. This can be used to display a small\nmarketing landing page, protect an alpha website from the public eye, make an\nannouncement, etc.\n\nMeant to be used with https://github.com/openedx/edx-platform/ -- or you will need\nto import the config_models application to your Django application:\nhttps://github.com/openedx/django-config-models\n\nInstallation\n------------\n\nAdd the application to the `INSTALLED_APPS`:\n\n::\n\n python\n INSTALLED_APPS = (\n ...\n # Splash screen\n 'splash',\n )\n\nAdd the middleware to the configuration:\n\n::\n\n python\n MIDDLEWARE_CLASSES = (\n ...\n 'splash.middleware.SplashMiddleware',\n )\n\nRun the migrations:\n\n``$ ./manage.py migrate splash``\n\nThen go to your Django admin, in http://yourserver/admin/splash/splashconfig/add/\nand configure the following variables:\n\n* `enabled`: To activate the feature\n* `cookie_name`: The name of the cookie\n* `cookie_allowed_values`: The user cookie value must match one of the values to not be redirected to the splash screen URL\n* `unaffected_users`: Users which should never be redirected (usernames)\n* `redirect_url`: The URL the users should be redirected to when they don't have the right cookie\n\nLicense\n-------\n\nThe code in this repository is licensed under the Apache Software License 2.0 unless\notherwise noted.\n\nPlease see ``LICENSE.txt`` for details.\n\nHow To Contribute\n-----------------\n\nContributions are very welcome.\n\nPlease read `How To Contribute <https://github.com/openedx/.github/blob/master/CONTRIBUTING.md>`_ for details.\n\n\nReporting Security Issues\n-------------------------\n\nPlease do not report security issues in public. Please email security@edx.org.\n\nGetting Help\n------------\n\nHave a question about this repository, or about Open edX in general? Please\nrefer to this `list of resources`_ if you need any assistance.\n\n.. _list of resources: https://open.edx.org/getting-help\n\n\n.. |pypi-badge| image:: https://img.shields.io/pypi/v/django-splash.svg\n :target: https://pypi.python.org/pypi/django-splash/\n :alt: PyPI\n\n.. |ci-badge| image:: https://github.com/openedx/django-splash/workflows/Python%20CI/badge.svg?branch=master\n :target: https://github.com/openedx/django-splash/actions?query=workflow%3A%22Python+CI%22\n :alt: CI\n\n.. |codecov-badge| image:: http://codecov.io/github/edx/django-splash/coverage.svg?branch=master\n :target: http://codecov.io/github/edx/django-splash?branch=master\n :alt: Codecov\n\n.. |pyversions-badge| image:: https://img.shields.io/pypi/pyversions/django-splash.svg\n :target: https://pypi.python.org/pypi/django-splash/\n :alt: Supported Python versions\n\n.. |license-badge| image:: https://img.shields.io/github/license/edx/django-splash.svg\n :target: https://github.com/openedx/django-splash/blob/master/LICENSE.txt\n :alt: License\n\n\nChange Log\n----------\n\n..\n All enhancements and patches to django-splash will be documented\n in this file. It adheres to the structure of http://keepachangelog.com/ ,\n but in reStructuredText instead of Markdown (for ease of incorporation into\n Sphinx documentation and the PyPI description).\n\n This project adheres to Semantic Versioning (http://semver.org/).\n\n.. There should always be an \"Unreleased\" section for changes pending release.\n\nUnreleased\n~~~~~~~~~~\n\n*\n\n[1.3.0] - 2023-06-09\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\nAdded \n_____\n\n* Added Support for Django42.\n\n[1.2.0] - 2022-01-26\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\nRemoved\n_______\n\n* Removed Support for Django22, 30, 31\n\nAdded\n_____\n\n* Added Support for Django40\n\n[1.1.0] - 2021-07-09\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\nAdded\n_____\n\n* Support for django3.2\n\n[0.2.2] - 2018-02-09\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\nAdded\n_____\n\n* Automatic upload to PyPI on tags.\n\n\n[0.2.1] - 2018-02-07\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\nAdded\n_____\n\n* First release on PyPI.\n",
"bugtrack_url": null,
"license": "Apache Software License 2.0",
"summary": "Splash screen middleware for Django apps",
"version": "1.3.0",
"project_urls": {
"Homepage": "https://github.com/openedx/django-splash"
},
"split_keywords": [
"django",
"edx"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "2be5b5bd6a042d75d0cf7c916ad84c0782bc3c0c08f50dc7a063a611ac9b3287",
"md5": "b28572c1906addab61746614b3003ba8",
"sha256": "8008579f65525ea17c73580ce4288773e3b72148d5ddc573fc06893b53991042"
},
"downloads": -1,
"filename": "django_splash-1.3.0-py2.py3-none-any.whl",
"has_sig": false,
"md5_digest": "b28572c1906addab61746614b3003ba8",
"packagetype": "bdist_wheel",
"python_version": "py2.py3",
"requires_python": null,
"size": 10315,
"upload_time": "2023-06-12T13:19:50",
"upload_time_iso_8601": "2023-06-12T13:19:50.775654Z",
"url": "https://files.pythonhosted.org/packages/2b/e5/b5bd6a042d75d0cf7c916ad84c0782bc3c0c08f50dc7a063a611ac9b3287/django_splash-1.3.0-py2.py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "f5c518b670abf12670bb4189dc202368dbef67ba5c20c5cee87c622f4fc514c5",
"md5": "0e62d3107b3268c09803e64ef3ab977e",
"sha256": "00de6f7115970f3446fe789574afdae4880a19bb5519215b06a71eb7acb1b102"
},
"downloads": -1,
"filename": "django-splash-1.3.0.tar.gz",
"has_sig": false,
"md5_digest": "0e62d3107b3268c09803e64ef3ab977e",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 11506,
"upload_time": "2023-06-12T13:19:51",
"upload_time_iso_8601": "2023-06-12T13:19:51.933225Z",
"url": "https://files.pythonhosted.org/packages/f5/c5/18b670abf12670bb4189dc202368dbef67ba5c20c5cee87c622f4fc514c5/django-splash-1.3.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2023-06-12 13:19:51",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "openedx",
"github_project": "django-splash",
"travis_ci": false,
"coveralls": true,
"github_actions": true,
"tox": true,
"lcname": "django-splash"
}