add list of files to documentation -- descriptions missing
[mygpo.git] / mygpo.fcgi
bloba9708853bf06ea4e63aab6c7cceeff2f1a8284f9
1 #!/usr/bin/python
2 # -*- coding: utf-8 -*-
3 # my.gpodder.org FastCGI handler for lighttpd (default setup)
5 # This file is part of my.gpodder.org.
7 # my.gpodder.org is free software: you can redistribute it and/or modify it
8 # under the terms of the GNU Affero General Public License as published by
9 # the Free Software Foundation, either version 3 of the License, or (at your
10 # option) any later version.
12 # my.gpodder.org is distributed in the hope that it will be useful, but
13 # WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
14 # or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public
15 # License for more details.
17 # You should have received a copy of the GNU Affero General Public License
18 # along with my.gpodder.org. If not, see <http://www.gnu.org/licenses/>.
21 import sys
22 import os
24 # Add this directory as custom Python path
25 mygpo_root = os.path.dirname(os.path.abspath(__file__))
26 sys.path.insert(0, mygpo_root)
27 sys.path.insert(0, os.path.join(mygpo_root, 'lib'))
29 # Set the DJANGO_SETTINGS_MODULE environment variable
30 os.environ['DJANGO_SETTINGS_MODULE'] = 'mygpo.settings'
32 # Start the FastCGI server for this application
33 from django.core.servers.fastcgi import runfastcgi
34 runfastcgi(method='threaded', daemonize='false')