Make discovery API url routing more flexible / less hacky
This commit is contained in:
Родитель
fe697dcbaa
Коммит
13e8ab72f7
|
@ -12,7 +12,7 @@ urlpatterns = patterns(
|
|||
|
||||
url(r'^v3/accounts/', include('olympia.accounts.urls')),
|
||||
url(r'^v3/addons/', include('olympia.addons.api_urls')),
|
||||
url(r'^v3/discovery/', include('olympia.discovery.api_urls')),
|
||||
url(r'^v3/', include('olympia.discovery.api_urls')),
|
||||
url(r'^v3/internal/', include('olympia.internal_tools.urls')),
|
||||
url(r'^v3/', include('olympia.signing.urls')),
|
||||
url(r'^v3/statistics/', include('olympia.stats.api_urls')),
|
||||
|
|
|
@ -4,10 +4,8 @@ from rest_framework.routers import SimpleRouter
|
|||
|
||||
from . import views
|
||||
|
||||
# Because we're registering things at "/discovery/" we don't want the trailing
|
||||
# slash that comes with the Router by default.
|
||||
discovery = SimpleRouter(trailing_slash=False)
|
||||
discovery.register(r'', views.DiscoveryViewSet, base_name='discovery')
|
||||
discovery = SimpleRouter()
|
||||
discovery.register('discovery', views.DiscoveryViewSet, base_name='discovery')
|
||||
|
||||
urlpatterns = [
|
||||
url(r'', include(discovery.urls)),
|
||||
|
|
Загрузка…
Ссылка в новой задаче