Skip to main content

EEA Frame

Django integration middleware for EEA Zope websites.

Template and request

pip install eea.frame

In your project’s settings.py add:

INSTALLED_APPS = (
... # django apps
'frame'
... # your project's apps
)

MIDDLEWARE_CLASSES = (
  'frame.middleware.RequestMiddleware',
  'frame.middleware.UserMiddleware',
  'django.contrib.sessions.middleware.SessionMiddleware',
  'django.middleware.common.CommonMiddleware',
  'django.middleware.csrf.CsrfViewMiddleware',
  'django.contrib.auth.middleware.AuthenticationMiddleware',
  'django.contrib.messages.middleware.MessageMiddleware',
  'django.middleware.clickjacking.XFrameOptionsMiddleware',
)

TEMPLATE_LOADERS = (
  'frame.middleware.Loader',
  'django.template.loaders.filesystem.Loader',
  'django.template.loaders.app_directories.Loader',
)

Also, usually in local_settings.py you need to define: FRAME_URL to an url pointing to a Zope frame instance, and FRAME_COOKIES = ['__ac', '_ZopeId', '__ginger_snap'].

You can skip https with FRAME_VERIFY_SSL = False.

Your layout.html must extend "frame.html" in order to use the frame.

You can set FRAME_EXTRA_SUBSTITUTIONS to a list of pairs to be replaced in the frame html.

Authentication Backend

If you want to use the Django groups and permissions settings with users from _eea.frame_, you need to set:

MIDDLEWARE_CLASSES = (
  ...
  'django.contrib.auth.middleware.RemoteUserMiddleware',
  ...
)

AUTHENTICATION_BACKENDS = (
  'django.contrib.auth.backends.ModelBackend',
  'frame.backends.FrameUserBackend',
)

For each user that is authenticated on eea.frame, a django.contrib.auth.models.User instance is created.

For each of the roles the user has in eea.frame, a django.contrib.auth.models.Group instance is created, and you can assign permissions to that group.

Seen Middleware

Use the seen middleware to keep for each user the datetime of the last visit to the application.

Set (at the end of the middleware classes setting):

MIDDLEWARE_CLASSES = (
  ...
  'frame.middleware.SeenMiddleware',
)

If you want to use the default view, add frame.utils.get_objects_from_last_seen_count to your url patterns, in a location such as ^/_lastseen/$, then set the FRAME_SEEN_MODELS to a list of pairs (model, field) for the objects to be counted.

You should exclude this view using FRAME_SEEN_EXCLUDE config setting.

Metadata

Release files for eea.frame 0.5.8

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

Source distribution (sdist)

Source distribution for eea.frame 0.5.8
File Size Uploaded Provenance Actions
eea_frame-0.5.8.tar.gz 6.5 kB Without provenance Details for eea_frame-0.5.8.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for eea.frame 0.5.8
File Interpreter ABI Platform Actions
eea_frame-0.5.8-py3-none-any.whl Python 3 none any Details for eea_frame-0.5.8-py3-none-any.whl

Total release size: 15.2 kB

Release files / eea_frame-0.5.8.tar.gz

Download URL eea_frame-0.5.8.tar.gz
Size 6.5 kB
Tags Source
SHA-256 checksum
How to use checksums
7d3332f7c382e51b533c65fe210bc25de7e0e0b9fd9e1c42aaf1679282df44e8
BLAKE2b-256 checksum
How to use checksums
4c99f6f8a80676b9e8fe0e85d0853f60c0f14716fcca6e0e46bc7c0309282bde
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.1

Release files / eea_frame-0.5.8-py3-none-any.whl

Download URL eea_frame-0.5.8-py3-none-any.whl
Size 8.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
56f5e88e3c71da4caa4eb1837f98751636b6fc28e50aea104868bc077b0079d0
BLAKE2b-256 checksum
How to use checksums
79ff00e76d8b149e2db9ede86443efd4f1a9cf68a50d039202a9f7dd3d8c5364
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.1

Security for eea.frame 0.5.8

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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