Skip to main content

EEA Frame

Project description

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'].

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

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.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

eea.frame-0.3.3.tar.gz (3.7 kB view details)

Uploaded Source

File details

Details for the file eea.frame-0.3.3.tar.gz.

File metadata

  • Download URL: eea.frame-0.3.3.tar.gz
  • Upload date:
  • Size: 3.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for eea.frame-0.3.3.tar.gz
Algorithm Hash digest
SHA256 d15b63592170bc0cd9b14ba6469fa71bfa2b8d5c985fd934cc81fc36b1249875
MD5 0ac2bd8d2938907db48a4f65edd6c4ab
BLAKE2b-256 828ac00de0b3dd4a01fd7dc8b3fa5b5b3cc8d956089c89f016406a316f96ae74

See more details on using hashes here.

Provenance

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page