kopia lustrzana https://github.com/wagtail/bakerydemo
pull/20/head
rodzic
7ee4f404bd
commit
87766bffb8
|
@ -93,6 +93,8 @@ class BreadPage(Page):
|
||||||
'BreadsIndexPage'
|
'BreadsIndexPage'
|
||||||
]
|
]
|
||||||
|
|
||||||
|
api_fields = ['title', 'bread_type', 'origin', 'image']
|
||||||
|
|
||||||
|
|
||||||
class BreadsIndexPage(Page):
|
class BreadsIndexPage(Page):
|
||||||
'''
|
'''
|
||||||
|
|
|
@ -50,7 +50,9 @@ INSTALLED_APPS = [
|
||||||
'wagtail.wagtailadmin',
|
'wagtail.wagtailadmin',
|
||||||
'wagtail.contrib.modeladmin',
|
'wagtail.contrib.modeladmin',
|
||||||
'wagtail.wagtailcore',
|
'wagtail.wagtailcore',
|
||||||
|
'wagtail.contrib.wagtailapi',
|
||||||
|
|
||||||
|
'rest_framework',
|
||||||
'modelcluster',
|
'modelcluster',
|
||||||
'taggit',
|
'taggit',
|
||||||
'wagtailfontawesome',
|
'wagtailfontawesome',
|
||||||
|
|
|
@ -8,6 +8,7 @@ from wagtail.wagtailcore import urls as wagtail_urls
|
||||||
|
|
||||||
from bakerydemo.search import views as search_views
|
from bakerydemo.search import views as search_views
|
||||||
|
|
||||||
|
from wagtail.contrib.wagtailapi import urls as wagtailapi_urls
|
||||||
|
|
||||||
urlpatterns = [
|
urlpatterns = [
|
||||||
url(r'^django-admin/', include(admin.site.urls)),
|
url(r'^django-admin/', include(admin.site.urls)),
|
||||||
|
@ -16,6 +17,7 @@ urlpatterns = [
|
||||||
url(r'^documents/', include(wagtaildocs_urls)),
|
url(r'^documents/', include(wagtaildocs_urls)),
|
||||||
|
|
||||||
url(r'^search/$', search_views.search, name='search'),
|
url(r'^search/$', search_views.search, name='search'),
|
||||||
|
url(r'^api/', include(wagtailapi_urls)),
|
||||||
|
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
Ładowanie…
Reference in New Issue