[extensions-web: 7/75] Add a sweettooth.wsgi.example file.
- From: Jasper St. Pierre <jstpierre src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [extensions-web: 7/75] Add a sweettooth.wsgi.example file.
- Date: Fri, 23 Sep 2011 03:15:01 +0000 (UTC)
commit 784b74a09b8e916344efdd45528a29625ca4904a
Author: Jasper St. Pierre <jstpierre mecheye net>
Date: Mon Sep 12 16:37:10 2011 -0400
Add a sweettooth.wsgi.example file.
.gitignore | 1 +
sweettooth.wsgi.example | 16 ++++++++++++++++
2 files changed, 17 insertions(+), 0 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index cacfc8d..da76433 100644
--- a/.gitignore
+++ b/.gitignore
@@ -10,3 +10,4 @@ venv
Demos
sweettooth/uploaded-files
local_settings.py
+sweettooth.wsgi
diff --git a/sweettooth.wsgi.example b/sweettooth.wsgi.example
new file mode 100644
index 0000000..bac4af3
--- /dev/null
+++ b/sweettooth.wsgi.example
@@ -0,0 +1,16 @@
+import os
+import site
+import sys
+
+os.environ['DJANGO_SETTINGS_MODULE'] = 'sweettooth.settings'
+
+_path = os.path.dirname(__file__)
+
+_venv = os.path.join(_path, 'venv/lib/python2.7/site-packages/')
+if os.path.exists(_venv):
+ site.addsitedir(_venv)
+
+sys.path.extend([_path, os.path.join(_path, 'sweettooth')])
+
+import django.core.handlers.wsgi
+application = django.core.handlers.wsgi.WSGIHandler()
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]