a start on showing how to embed a widget in a third party site

pull/1/head
Raymond Yee 2011-10-22 08:18:04 -07:00
parent 6aa01701a4
commit dcd4727c95
2 changed files with 9 additions and 0 deletions

View File

@ -0,0 +1,7 @@
<!doctype html>
<head>
</head>
<body>
<p>Our widget</p>
<iframe src="http://ry-dev.dyndns.org/api/widget/0811216993/" width="150" height="360" frameborder="0"></iframe>
</body>

View File

@ -1,6 +1,7 @@
from django.conf.urls.defaults import * from django.conf.urls.defaults import *
from tastypie.api import Api from tastypie.api import Api
from regluit.api.views import ApiHelpView from regluit.api.views import ApiHelpView
from django.views.generic.base import TemplateView
from regluit.api import resources from regluit.api import resources
@ -15,6 +16,7 @@ v1_api.register(resources.WishlistResource())
urlpatterns = patterns('', urlpatterns = patterns('',
url(r'^help$', ApiHelpView.as_view(), name="api_help"), url(r'^help$', ApiHelpView.as_view(), name="api_help"),
url(r'^widgettest/$',TemplateView.as_view(template_name="widget_embed.html")),
url(r'^widget/(?P<isbn>\w+)/$','regluit.api.views.widget', name="widget"), url(r'^widget/(?P<isbn>\w+)/$','regluit.api.views.widget', name="widget"),
(r'^', include(v1_api.urls)), (r'^', include(v1_api.urls)),
) )