[Update] 更新api

pull/1213/head
ibuler 2018-04-12 17:31:37 +08:00
parent 8dfdefd428
commit 967800391e
2 changed files with 5 additions and 3 deletions

View File

@ -36,9 +36,11 @@ urlpatterns = [
url(r'^captcha/', include('captcha.urls')), url(r'^captcha/', include('captcha.urls')),
] ]
urlpatterns += static(settings.STATIC_URL, document_root=settings.STATIC_ROOT) \
+ static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
if settings.DEBUG: if settings.DEBUG:
urlpatterns += [ urlpatterns += [
url(r'^docs/', schema_view, name="docs"), url(r'^docs/', schema_view, name="docs"),
] + static(settings.STATIC_URL, document_root=settings.STATIC_ROOT) \ ]
+ static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)

View File

@ -248,7 +248,7 @@ class CommandViewSet(viewsets.ViewSet):
class SessionReplayViewSet(viewsets.ViewSet): class SessionReplayViewSet(viewsets.ViewSet):
serializer_class = ReplaySerializer serializer_class = ReplaySerializer
permission_classes = () permission_classes = (IsSuperUserOrAppUser,)
session = None session = None
def gen_session_path(self): def gen_session_path(self):