Skip to content

Instantly share code, notes, and snippets.

@mpdavis
Last active August 29, 2015 14:06
Show Gist options
  • Save mpdavis/64a042b7e0cf6da00f3a to your computer and use it in GitHub Desktop.
Save mpdavis/64a042b7e0cf6da00f3a to your computer and use it in GitHub Desktop.
from django.conf.urls import patterns, url, include
from rest_framework.routers import DefaultRouter
from api_1 import views as api_1_views
router = DefaultRouter()
router.register('groups', service_views.GroupViewSet)
urlpatterns = patterns(
'',
url(r'^$', include(router.urls)),
)
from django.conf.urls import patterns, url, include
from base import views as base_views
urlpatterns = patterns(
'',
url(r'^api/v1/$', base_views.APIRootView.as_view(), name='api-root'),
url(r'^api/v1/api_1/', include('api_1.urls')),
url(r'^api/v1/api_2/', include('api_2.urls')),
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment