from django import template
from .. import env


register = template.Library()
@register.simple_tag(name="getenv")
def getenv(envvar):

    """ Return an environment variable for use in a template. """

    return env(envvar)


from django import template
from .. import env


register = template.Library()
@register.simple_tag(name="getenv")
def getenv(envvar, default=''):

    """ Return an environment variable for use in a template. """
    """ If environment variable doesn't exists return a default value """

    return env(envvar) or default


Update getenv.py