You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
27 lines
738 B
27 lines
738 B
"""
|
|
WSGI config for archilance project.
|
|
|
|
It exposes the WSGI callable as a module-level variable named ``application``.
|
|
|
|
For more information on this file, see
|
|
https://docs.djangoproject.com/en/1.9/howto/deployment/wsgi/
|
|
"""
|
|
|
|
from django.core.wsgi import get_wsgi_application
|
|
from django.template.base import Variable
|
|
import os
|
|
|
|
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "archilance.settings")
|
|
|
|
application = get_wsgi_application()
|
|
|
|
|
|
# Patch template Variable to output empty string for None values:
|
|
|
|
old_resolve_lookup = Variable._resolve_lookup
|
|
|
|
def new_resolve_lookup(self, *args, **kwargs):
|
|
val = old_resolve_lookup(self, *args, **kwargs)
|
|
return '' if val == None else val
|
|
|
|
Variable._resolve_lookup = new_resolve_lookup
|
|
|