Quick fix :(
authorŁukasz Rekucki <lrekucki@gmail.com>
Thu, 8 Oct 2009 15:30:59 +0000 (17:30 +0200)
committerŁukasz Rekucki <lrekucki@gmail.com>
Thu, 8 Oct 2009 15:30:59 +0000 (17:30 +0200)
apps/api/urls.py
project/templates/manager/pull_request.html

index d22d595..5464374 100644 (file)
@@ -30,7 +30,7 @@ urlpatterns = patterns('',
 
     # Pull requests
     url(r"^pull-requests$", pullrequest_collection,
 
     # Pull requests
     url(r"^pull-requests$", pullrequest_collection,
-        {'emitter_format': 'json'} ),
+        {'emitter_format': 'json'}, name="pullrequest_list" ),
         
     url(r"^pull-requests/(?P<prq_id>\d+)$", pullrequest_rsrc,
         {'emitter_format': 'json'}, name="pullrequest_view" ),
         
     url(r"^pull-requests/(?P<prq_id>\d+)$", pullrequest_rsrc,
         {'emitter_format': 'json'}, name="pullrequest_view" ),
index 9c23436..c902da9 100644 (file)
@@ -35,7 +35,7 @@
             
 
             $.ajax({
             
 
             $.ajax({
-                url: "http://localhost:8000/api/pull-requests/" + id,
+                url: '{% url pullrequest_list  %}/'+id,
                 data: {action: 'accept'},
                 dataType: 'json',
                 type: 'PUT',
                 data: {action: 'accept'},
                 dataType: 'json',
                 type: 'PUT',