Skip to main content

Very simple application, that allow to define a thread specific global variables.

Project description

Django-globals

changelog

Django-globals, is a very simple application, that allow to define a thread specific global variables.

Also, it includes a middleware Global, which can be used, to access to the current request and user outside a view, when “request” variable is not defined.

Installation

Install django_globals using pip.

Next, add django_globals to the INSTALLED_APPS and django_globals.middleware.Global to the MIDDLEWARE_CLASSES.

Now you can make from django_globals import globals and access to the globals.request and globals.user from anywhere.

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

django-globals-0.2.1.tar.gz (3.3 kB view hashes)

Uploaded source

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