Commits

Scott Nixon committed 03d92ef

Fixed refer lookup issue in the handler.

  • Participants
  • Parent commits a196177

Comments (0)

Files changed (4)

File inbounding/dispatch/api/handlers.py

     
     def read(self, request):
         try:
-            if Refer.objects.filter(name=request.GET.get('ref')):
-                element = Action.objects.select_related().get(url=request.GET.get('u'))
-                return element #get_object_or_404(Action, url=request.GET.get('u'))
+            result = Action.objects.select_related().\
+                              filter(url=request.GET.get('u'), \
+                                     refer__name=request.GET.get('ref'))
+            if not result:
+                result = "No valid Refer & Action combination was found."
+            return result
         except Action:
-            return "Refer not found."
+            return "An exception occured when checking the Referrer."
 
 class ActionHandler(BaseHandler):
     '''

File inbounding/dispatch/static/in.js

 };
 
 INBOUND.queryAction = function(ref_url, host_url, callback) {
-    var host_d = 'localhost:8000';
+    var host_d = 'localhost:8100';
     var host_p = 'in_dev.ep.io';
 
     $.ajax({
     INBOUND.loadcss();
 };
 
-INBOUND.css = 'http://localhost:8000/static/css/ck_main.css?v=3';
+INBOUND.css = 'http://localhost:8100/static/css/ck_main.css?v=3';
 
 /* Load CSS into the page with the Action Box.*/
 INBOUND.loadcss = function loadcss() { 

File inbounding/requirements.txt

 django-piston==0.2.2
 django-userena
 pil
-pip install -e git+https://github.com/leftium/mailsnake.git#egg=mailsnake
+-e git+https://github.com/leftium/mailsnake.git#egg=mailsnake
 

File inbounding/settings.py

 import socket
 
-DEVELOPMENT_HOST = 'xdev'
+DEVELOPMENT_HOST = 'xdev2'
 
 if socket.gethostname() == DEVELOPMENT_HOST:
     from settings_development import *