Skip to content

ashvetsov/django-globals

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Django-globals

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

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

Installation

Download sources, add place django_globals somewhere in yours python path.

Next, add django_globals to the INSTALLED_APPS and, optionally, 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 anywhere.

About

Thread specific global variables with middleware to hold a reference to the current user.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Python 100.0%