From 0fc7c2f7739417fba5ece7497a1f962789370b69 Mon Sep 17 00:00:00 2001 From: fefa4ka Date: Mon, 27 Jul 2015 14:07:27 +0300 Subject: [PATCH] wsgi fix --- {zsite => app}/wsgi.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) rename {zsite => app}/wsgi.py (51%) diff --git a/zsite/wsgi.py b/app/wsgi.py similarity index 51% rename from zsite/wsgi.py rename to app/wsgi.py index 76eb5e8..63515cb 100644 --- a/zsite/wsgi.py +++ b/app/wsgi.py @@ -1,5 +1,8 @@ +#!/usr/bin/python +# -*- coding: utf-8 -*- + """ -WSGI config for zsite project. +WSGI config for prototype project. It exposes the WSGI callable as a module-level variable named ``application``. @@ -8,7 +11,10 @@ https://docs.djangoproject.com/en/1.7/howto/deployment/wsgi/ """ import os -os.environ.setdefault("DJANGO_SETTINGS_MODULE", "zsite.settings") +import newrelic.agent +newrelic.agent.initialize("app/conf/newrelic.ini") +os.environ.setdefault("DJANGO_SETTINGS_MODULE", "app.settings") from django.core.wsgi import get_wsgi_application application = get_wsgi_application() +application = newrelic.agent.wsgi_application()(application)