2011-01-30 21:30:39 +03:00
|
|
|
from django.conf.urls.defaults import patterns, url
|
2011-05-16 17:11:36 +04:00
|
|
|
from djangorestframework.views import ListOrCreateModelView, InstanceModelView
|
2011-06-15 17:09:01 +04:00
|
|
|
from modelresourceexample.resources import MyModelResource
|
2011-01-30 21:30:39 +03:00
|
|
|
|
2011-05-19 11:36:55 +04:00
|
|
|
urlpatterns = patterns('',
|
2011-05-16 17:11:36 +04:00
|
|
|
url(r'^$', ListOrCreateModelView.as_view(resource=MyModelResource), name='model-resource-root'),
|
2011-06-15 17:09:01 +04:00
|
|
|
url(r'^(?P<pk>[0-9]+)/$', InstanceModelView.as_view(resource=MyModelResource)),
|
2011-01-30 21:30:39 +03:00
|
|
|
)
|