mirror of
https://github.com/Hopiu/wagtail.git
synced 2026-05-20 13:01:56 +00:00
16 lines
397 B
Python
16 lines
397 B
Python
from django.conf.urls import url
|
|
|
|
from wagtail.api.v2.router import WagtailAPIRouter
|
|
from wagtail.core import hooks
|
|
|
|
from .endpoints import PagesAdminAPIViewSet
|
|
|
|
admin_api = WagtailAPIRouter('wagtailadmin_api_v1')
|
|
admin_api.register_endpoint('pages', PagesAdminAPIViewSet)
|
|
|
|
for fn in hooks.get_hooks('construct_admin_api'):
|
|
fn(admin_api)
|
|
|
|
urlpatterns = [
|
|
url(r'^main/', admin_api.urls),
|
|
]
|