# wsgi_app.py
import sys, os

filedir = os.path.dirname(__file__)
sys.path.append(os.path.join(filedir))

#print sys.path

os.environ["CELERY_LOADER"] = "django"
os.environ['DJANGO_SETTINGS_MODULE'] = 'settings'
import sys
print sys.path

from django.core.handlers.wsgi import WSGIHandler

application = WSGIHandler()

# wsgi_app.py
import sys, os

filedir = os.path.dirname(__file__)
sys.path.append(os.path.join(filedir))

#print sys.path

os.environ["CELERY_LOADER"] = "django"
os.environ['DJANGO_SETTINGS_MODULE'] = 'settings'
import sys
print sys.path

from django.core.handlers.wsgi import WSGIHandler
from linesman.middleware import make_linesman_middleware

application = WSGIHandler()
application = make_linesman_middleware(application)

Apply linesman profiler to the wsgi app
Apply linesman profiler to the wsgi app

I fully expect this commit to be backed out when we get the profiling
stuff sorted out, but thankfully, this profiler can be disabled for a
live site.

check out http://<site>/__profiler__ after installing linesman, and
running the uwsgi server
