2014-05-08 16:59:35 +00:00
|
|
|
from django.contrib import admin
|
2024-01-26 13:05:02 +00:00
|
|
|
from django.urls import include, path, re_path
|
2023-11-21 12:40:18 +00:00
|
|
|
from django.urls import path
|
2016-04-30 11:23:13 +00:00
|
|
|
from rest_framework.authtoken.views import obtain_auth_token
|
|
|
|
|
|
|
|
from orchestra.views import serve_private_media
|
2014-05-08 16:59:35 +00:00
|
|
|
|
|
|
|
from . import api
|
2015-05-04 14:19:58 +00:00
|
|
|
from .utils.apps import isinstalled
|
2014-05-08 16:59:35 +00:00
|
|
|
|
|
|
|
|
|
|
|
admin.autodiscover()
|
|
|
|
api.autodiscover()
|
|
|
|
|
2015-05-04 14:19:58 +00:00
|
|
|
|
2015-05-19 13:27:04 +00:00
|
|
|
urlpatterns = [
|
2014-05-08 16:59:35 +00:00
|
|
|
# Admin
|
2024-01-26 13:05:02 +00:00
|
|
|
re_path(r'^admin/', admin.site.urls),
|
|
|
|
path('admin_tools/', include('admin_tools.urls')),
|
2014-05-08 16:59:35 +00:00
|
|
|
# REST API
|
2024-01-26 13:05:02 +00:00
|
|
|
path('api/', include(api.router.urls)),
|
|
|
|
path('api-auth/', include('rest_framework.urls', namespace='rest_framework')),
|
|
|
|
re_path(r'^api-token-auth/', obtain_auth_token, name='api-token-auth'),
|
|
|
|
re_path(r'^media/(.+)/(.+)/(.+)/(.+)/(.+)$', serve_private_media, name='private-media'),
|
2015-10-08 09:00:22 +00:00
|
|
|
# url(r'search', 'orchestra.views.search', name='search'),
|
2023-11-21 12:40:18 +00:00
|
|
|
# MUSICIAN
|
|
|
|
path('panel/', include('orchestra.contrib.musician.urls')),
|
2015-05-19 13:27:04 +00:00
|
|
|
]
|
2014-05-08 16:59:35 +00:00
|
|
|
|
2014-10-07 13:08:59 +00:00
|
|
|
|
2015-05-04 14:19:58 +00:00
|
|
|
if isinstalled('debug_toolbar'):
|
2014-05-08 16:59:35 +00:00
|
|
|
import debug_toolbar
|
2015-05-19 13:27:04 +00:00
|
|
|
urlpatterns.append(
|
2024-01-26 13:05:02 +00:00
|
|
|
path('__debug__/', include(debug_toolbar.urls)),
|
2014-05-08 16:59:35 +00:00
|
|
|
)
|