Very simple application, that allow to define a thread specific global variables.
Project description
Django-globals
--------------
[![changelog](http://allmychanges.com/p/python/django-globals/badge)](http://allmychanges.com/p/python/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:
https://github.com/svetlyak40wt/django-globals/issues
--------------
[![changelog](http://allmychanges.com/p/python/django-globals/badge)](http://allmychanges.com/p/python/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:
https://github.com/svetlyak40wt/django-globals/issues
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.3.1.tar.gz
(3.3 kB
view hashes)
Built Distribution
Close
Hashes for django_globals-0.3.1-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ee85bd5cca07b9f8cf6fdcd4932af6bd5316bfcda28c8c82778cb2bcab48d691 |
|
MD5 | 532fc502b7d66fa1d389c9487d805efd |
|
BLAKE2b-256 | e6349fdedb06d6a77dbf7e8be8cffeb28251956ea7b5e5d94ce1d6969c8e907a |