summaryrefslogtreecommitdiffstats
path: root/src/lib
diff options
context:
space:
mode:
authorTim Laszlo <tim.laszlo@gmail.com>2010-10-18 11:11:18 -0500
committerSol Jerome <sol.jerome@gmail.com>2010-11-02 20:35:18 -0500
commit4cbecb5c7dd792bb0da2d75e7372625d07a920d1 (patch)
treee5bae34413075ce5603376291de3f3ca0acee8f6 /src/lib
parent6b9c663a568dbde04b738bd33a9f30afc6048938 (diff)
downloadbcfg2-4cbecb5c7dd792bb0da2d75e7372625d07a920d1.tar.gz
bcfg2-4cbecb5c7dd792bb0da2d75e7372625d07a920d1.tar.bz2
bcfg2-4cbecb5c7dd792bb0da2d75e7372625d07a920d1.zip
web_reports: remove web_prefix, add wsgi handler
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/Server/Reports/reports.wsgi4
-rw-r--r--src/lib/Server/Reports/urls.py26
2 files changed, 13 insertions, 17 deletions
diff --git a/src/lib/Server/Reports/reports.wsgi b/src/lib/Server/Reports/reports.wsgi
new file mode 100644
index 000000000..232650485
--- /dev/null
+++ b/src/lib/Server/Reports/reports.wsgi
@@ -0,0 +1,4 @@
+import os
+os.environ['DJANGO_SETTINGS_MODULE'] = 'Bcfg2.Server.Reports.settings'
+import django.core.handlers.wsgi
+application = django.core.handlers.wsgi.WSGIHandler()
diff --git a/src/lib/Server/Reports/urls.py b/src/lib/Server/Reports/urls.py
index 5d298c974..85bad72fb 100644
--- a/src/lib/Server/Reports/urls.py
+++ b/src/lib/Server/Reports/urls.py
@@ -3,24 +3,16 @@ from django.http import HttpResponsePermanentRedirect
handler500 = 'Bcfg2.Server.Reports.reports.views.server_error'
-from ConfigParser import ConfigParser, NoSectionError, NoOptionError
-c = ConfigParser()
-c.read(['/etc/bcfg2.conf', '/etc/bcfg2-web.conf'])
-
-# web_prefix should have a trailing slash, but no leading slash
-# e.g. web_prefix = bcfg2/
-# web_prefix_root is a workaround for the index
-if c.has_option('statistics', 'web_prefix'):
- web_prefix = c.get('statistics', 'web_prefix').lstrip('/')
-else:
- web_prefix = ''
+#from ConfigParser import ConfigParser, NoSectionError, NoOptionError
+#c = ConfigParser()
+#c.read(['/etc/bcfg2.conf', '/etc/bcfg2-web.conf'])
urlpatterns = patterns('',
- (r'^%s' % web_prefix, include('Bcfg2.Server.Reports.reports.urls'))
+ (r'^', include('Bcfg2.Server.Reports.reports.urls'))
)
-urlpatterns += patterns("django.views",
- url(r"media/(?P<path>.*)$", "static.serve", {
- "document_root": '/Users/tlaszlo/svn/bcfg2/reports/site_media/',
- })
-)
+#urlpatterns += patterns("django.views",
+# url(r"media/(?P<path>.*)$", "static.serve", {
+# "document_root": '/Users/tlaszlo/svn/bcfg2/reports/site_media/',
+# })
+#)