mirror of
https://github.com/wagtail/wagtail.git
synced 2024-12-01 11:41:20 +01:00
25 lines
531 B
ReStructuredText
25 lines
531 B
ReStructuredText
Wagtail API Installation
|
|
========================
|
|
|
|
|
|
To install, add ``wagtail.contrib.wagtailapi`` and ``rest_framework`` to ``INSTALLED_APPS`` in your Django settings and configure a URL for it in ``urls.py``:
|
|
|
|
.. code-block:: python
|
|
|
|
# settings.py
|
|
|
|
INSTALLED_APPS = [
|
|
...
|
|
'wagtail.contrib.wagtailapi',
|
|
'rest_framework',
|
|
]
|
|
|
|
# urls.py
|
|
|
|
from wagtail.contrib.wagtailapi import urls as wagtailapi_urls
|
|
|
|
urlpatterns = [
|
|
...
|
|
url(r'^api/', include(wagtailapi_urls)),
|
|
]
|