Commits

David Wolever committed f768bab

Adding script to run wscgi

  • Participants
  • Parent commits 0ce4ff8

Comments (0)

Files changed (2)

File bookmarklet.js

 javascript: (
-function() {
+function(queue) {
     var windowstatus =
         "scrollbars=1," +
         "status=1," +
         "</body>" +
     "</html>");
     var form = nq_window.document.getElementById('nq');
-    form.action = "http://127.0.0.1:8000/queue/myqueue/enqueue";
+    form.action = "http://urlqueue.wolever.net/queue/" + queue + "/enqueue";
     form.url.value = document.location.href;
     form.title.value = document.title;
     form.submit();
 }
-)();
+)("the+queue+name");
+#!/usr/bin/env python
+import os, sys
+
+"""
+Apache settings:
+
+<Directory APP_PATH>
+    Order allow,deny
+    Allow from all
+</Directory>
+
+Alias /APP/static APP_PATH/static/
+WSGIDaemonProcess APP user=USER group=GROUP
+WSGIProcessGroup APP
+WSGIScriptAlias /APP APP_PATH
+"""
+
+app_path = os.path.dirname(__file__)
+
+if "settings.py" not in os.listdir(app_path):
+    print "Error: settings.py not found in %r" %(app_path)
+    sys.exit(1)
+
+(app_parent_dir, app_name) = os.path.split(app_path)
+
+sys.path.append(app_parent_dir)
+sys.path.append(app_path)
+
+os.environ['DJANGO_SETTINGS_MODULE'] = app_name + '.settings'
+
+import django.core.handlers.wsgi
+application = django.core.handlers.wsgi.WSGIHandler()