Importing MP3 and Ogg Vorbis files with filenames based on book slug, not on source...
[wolnelektury.git] / wolnelektury / deploy / wolnelektury.wsgi
1 #!/usr/bin/env python
2 from os.path import abspath, dirname, join
3 import sys
4
5 # Redirect sys.stdout to sys.stderr for bad libraries like geopy that use
6 # print statements for optional import exceptions.
7 sys.stdout = sys.stderr
8
9 # Add apps and lib directories to PYTHONPATH
10 sys.path.insert(0, abspath(join(dirname(__file__), '../../apps')))
11 sys.path.insert(0, abspath(join(dirname(__file__), '../../lib')))
12
13 # Emulate manage.py path hacking.
14 sys.path.insert(0, abspath(join(dirname(__file__), "../../")))
15 sys.path.insert(0, abspath(join(dirname(__file__), "../")))
16
17 # Run Django
18 os.environ['DJANGO_SETTINGS_MODULE'] = 'settings'
19
20 from django.core.handlers.wsgi import WSGIHandler
21 application = WSGIHandler()
22