2023-07-09 07:51:51 +00:00
|
|
|
from django.contrib import admin
|
|
|
|
from django.conf.urls import include, url
|
2023-11-21 12:40:18 +00:00
|
|
|
from django.urls import path
|
2023-07-09 07:51:51 +00:00
|
|
|
from rest_framework.authtoken.views import obtain_auth_token
|
|
|
|
|
|
|
|
from orchestra.views import serve_private_media
|
|
|
|
|
|
|
|
from . import api
|
|
|
|
from .utils.apps import isinstalled
|
|
|
|
|
|
|
|
|
|
|
|
admin.autodiscover()
|
|
|
|
api.autodiscover()
|
|
|
|
|
|
|
|
|
|
|
|
urlpatterns = [
|
|
|
|
# Admin
|
|
|
|
url(r'^admin/', admin.site.urls),
|
|
|
|
url(r'^admin_tools/', include('admin_tools.urls')),
|
|
|
|
# REST API
|
|
|
|
url(r'^api/', include(api.router.urls)),
|
|
|
|
url(r'^api-auth/', include('rest_framework.urls', namespace='rest_framework')),
|
|
|
|
url(r'^api-token-auth/', obtain_auth_token, name='api-token-auth'),
|
|
|
|
url(r'^media/(.+)/(.+)/(.+)/(.+)/(.+)$', serve_private_media, name='private-media'),
|
|
|
|
# url(r'search', 'orchestra.views.search', name='search'),
|
2023-11-21 12:40:18 +00:00
|
|
|
# MUSICIAN
|
|
|
|
path('panel/', include('orchestra.contrib.musician.urls')),
|
2023-07-09 07:51:51 +00:00
|
|
|
]
|
|
|
|
|
|
|
|
|
|
|
|
if isinstalled('debug_toolbar'):
|
|
|
|
import debug_toolbar
|
|
|
|
urlpatterns.append(
|
|
|
|
url(r'^__debug__/', include(debug_toolbar.urls)),
|
|
|
|
)
|