########################################################################### from django.conf.urls import patterns, url, include from rest_framework.urlpatterns import format_suffix_patterns from rest_framework.routers import DefaultRouter from api.rest import resources from api.rest.views.status import StatusView from api.rest.views.meta import ArticleMetaView from api.rest.views.tokens import TokensView from api.rest.viewsets import get_viewsets router = DefaultRouter() for vs in get_viewsets(): router.register(vs.get_url_pattern(), vs, base_name=vs.get_basename()) urlpatterns = format_suffix_patterns( patterns( '', url(r'^query/', include("api.rest.query.urls")), url(r'^$', resources.api_root), url(r'^taskresult/(?P<task_id>[0-9]+)$', resources.single_task_result, dict(uuid=False)), url(r'^taskresult/(?P<task_id>[0-9a-zA-Z-]+)$', resources.single_task_result, dict(uuid=True)), url(r'^get_token', 'api.rest.get_token.obtain_auth_token'), url(r'^status/$', StatusView.as_view(), name="status"), url(r'^projects/(?P<project_id>[0-9]+)/articlesets/(?P<articleset_id>[0-9]+)/meta/?$', ArticleMetaView.as_view(), name="meta"),
# # # You should have received a copy of the GNU Affero General Public # # License along with AmCAT. If not, see <http://www.gnu.org/licenses/>. # ########################################################################### from django.conf.urls import include, url from rest_framework.routers import DefaultRouter import api.rest.get_token from api.rest import resources from api.rest.views.meta import ArticleMetaView from api.rest.views.status import StatusView from api.rest.views.tokens import TokensView from api.rest.viewsets import get_viewsets, UserViewSet router = DefaultRouter() for vs in get_viewsets(): router.register(vs.get_url_pattern(), vs, base_name=vs.get_basename()) urlpatterns = [ url(r'^query/', include("api.rest.query.urls")), url(r'^$', resources.api_root), url(r'^taskresult/(?P<task_id>[0-9]+)$', resources.single_task_result, dict(uuid=False)), url(r'^taskresult/(?P<task_id>[0-9a-zA-Z-]+)$', resources.single_task_result, dict(uuid=True)), url(r'^get_token', api.rest.get_token.obtain_auth_token), url(r'^status/$', StatusView.as_view(), name="status"), url(r'^projects/(?P<project_id>[0-9]+)/articlesets/(?P<articleset_id>[0-9]+)/meta/?$', ArticleMetaView.as_view(), name="meta"), url(r'^meta/?$', ArticleMetaView.as_view(), name="meta"), url(r'^projects/(?P<project_id>[0-9]+)/articlesets/(?P<articleset_id>[0-9]+)/tokens/?$', TokensView.as_view(), name="tokens"),