Commits

Chris Gregory  committed 270316b

Fab deploy

  • Participants
  • Parent commits 0b53fbb

Comments (0)

Files changed (2)

File home/urls.py

         url(r'^$', 'home.views.index', name='root_path'),
         url(r'^design/$', 'home.views.design'),
         url(r'^welcome/$', 'home.views.welcome'),
-        url(r'^webhook/(?P<product_id>\d+)/(?P<variant_id>\d+)/$', 'home.views.webhook'),
+        url(r'^ajax/(?P<product_id>\d+)/(?P<variant_id>\d+)/$', 'home.views.webhook'),
 )

File home/views.py

     return render_to_response('home/design.html', {},
                               context_instance=RequestContext(request))
 
-def webhook(request, product_id, variant_id):
-    return HttpResponse("%s-%s" % (product_id, variant_id))
+def ajax(request, product_id, variant_id):
+    variant = shopify.Variant(dict(product_id=product_id, id=variant_id, inventory_quantity=0, inventory_policy="deny"))
+    return HttpResponse(200)
 
+