Very simple application, that allow to define a thread specific global variables.
Project description
Django-globals
Django-globals is a very simple application, that allow you to define thread specific global variables.
It includes a middleware Global, which can be used to access to the current request and user, which is useful outside of a view when the “request” variable is not defined.
Installation
Install using pip
pip install django-globals
Configuration
In your project’s settings.py, add django_globals.middleware.Global to MIDDLEWARE (or MIDDLEWARE_CLASSES on Django < 1.10).
Usage
Now you can use from django_globals import globals and access to the globals.request and globals.user from anywhere.
Help
For more information see the documentation at:
https://django-globals.readthedocs.io/
If you have questions or have trouble using the app please file a bug report at:
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file django-globals-0.3.2.tar.gz.
File metadata
- Download URL: django-globals-0.3.2.tar.gz
- Upload date:
- Size: 3.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: Python-urllib/3.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
bfcee81e7c6771f32ea12a4c7f82b52ce69ef1dd571356693ce21788e7cbab57
|
|
| MD5 |
ea23ed309ad007ca1e184792055b5919
|
|
| BLAKE2b-256 |
1149e07d7a8ed6bab195b0210dfa407278fa33784d090b547b651b3379ba3438
|
File details
Details for the file django_globals-0.3.2-py2.py3-none-any.whl.
File metadata
- Download URL: django_globals-0.3.2-py2.py3-none-any.whl
- Upload date:
- Size: 2.6 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: Python-urllib/3.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
000d9172c1443a9cb4ba70ff1ac656d6f082fe9d8afa07a5ff2f5b1edb235253
|
|
| MD5 |
1801c006a77393fbe169d497fd69a0ba
|
|
| BLAKE2b-256 |
1b3152cf6de4f1f5972d8540986b414c231fd4c7cf699c33d204de07b0708376
|