2011-09-12 20:02:06 +00:00
|
|
|
from django.conf.urls.defaults import *
|
|
|
|
from tastypie.api import Api
|
2011-10-20 00:08:17 +00:00
|
|
|
from regluit.api.views import ApiHelpView
|
2011-10-22 15:18:04 +00:00
|
|
|
from django.views.generic.base import TemplateView
|
2011-09-12 20:02:06 +00:00
|
|
|
|
2011-09-15 22:33:05 +00:00
|
|
|
from regluit.api import resources
|
2011-09-12 22:44:20 +00:00
|
|
|
|
2011-09-15 22:33:05 +00:00
|
|
|
v1_api = Api(api_name='v1')
|
|
|
|
v1_api.register(resources.UserResource())
|
|
|
|
v1_api.register(resources.WorkResource())
|
2012-01-10 20:20:02 +00:00
|
|
|
v1_api.register(resources.IdentifierResource())
|
2011-09-15 22:33:05 +00:00
|
|
|
v1_api.register(resources.EditionResource())
|
|
|
|
v1_api.register(resources.CampaignResource())
|
|
|
|
v1_api.register(resources.AuthorResource())
|
|
|
|
v1_api.register(resources.SubjectResource())
|
|
|
|
v1_api.register(resources.WishlistResource())
|
2011-09-12 20:02:06 +00:00
|
|
|
|
|
|
|
urlpatterns = patterns('',
|
2011-10-20 00:08:17 +00:00
|
|
|
url(r'^help$', ApiHelpView.as_view(), name="api_help"),
|
2011-10-22 15:18:04 +00:00
|
|
|
url(r'^widgettest/$',TemplateView.as_view(template_name="widget_embed.html")),
|
2011-09-21 05:22:48 +00:00
|
|
|
url(r'^widget/(?P<isbn>\w+)/$','regluit.api.views.widget', name="widget"),
|
2011-09-12 22:44:20 +00:00
|
|
|
(r'^', include(v1_api.urls)),
|
2011-09-12 20:02:06 +00:00
|
|
|
)
|