Skip to main content

Django-related utilities

Project description

by John Mark Schofield (

Provides common utility functions for Django projects.

(It’s django-fu as in Kung Fu, not as in F-U.)

Currently provides django-fu.djangoenvironment.get_env_variable().

Loads an environment variable into the current context, or raises an exception.


>>> from djangofu.general import get_env_variable
>>> get_env_variable('SHELL')
>>> get_env_variable('foobar')
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/Users/schof/.virtualenvs/dbfweb/lib/python2.7/site-packages/djangofu/", line 12, in get_env_variable
    raise ImproperlyConfigured(error_msg)
django.core.exceptions.ImproperlyConfigured: Set the foobar environment variable


get_env_variable was taken from the book “Two Scoops of Django,” by Daniel Greenfield and Audrey Roy. []

Project details

Download files

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

Files for djangofu, version 0.0.6
Filename, size File type Python version Upload date Hashes
Filename, size djangofu-0.0.6.tar.gz (1.3 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring DigiCert DigiCert EV certificate Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page