25 lines
578 B
Python
25 lines
578 B
Python
|
# -*- coding: utf-8 -*-
|
||
|
from django.contrib import admin
|
||
|
from django.urls import path
|
||
|
|
||
|
from bthlabs_jsonrpc_django import JSONRPCView, is_authenticated, is_staff
|
||
|
|
||
|
urlpatterns = [
|
||
|
path('admin/', admin.site.urls),
|
||
|
path(
|
||
|
'rpc/admin',
|
||
|
JSONRPCView.as_view(
|
||
|
auth_checks=[is_authenticated, is_staff],
|
||
|
namespace='admin',
|
||
|
),
|
||
|
),
|
||
|
path(
|
||
|
'rpc/private',
|
||
|
JSONRPCView.as_view(
|
||
|
auth_checks=[is_authenticated],
|
||
|
namespace='private',
|
||
|
),
|
||
|
),
|
||
|
path('rpc', JSONRPCView.as_view()),
|
||
|
]
|