Django BookStack is a simple Django application that allows you to interact with a BookStack API.
- Add "django_bookstack" to your INSTALLED_APPS settings like this:
# settings.py
INSTALLED_APPS = [
...,
'django_bookstack',
]
- Configure some bookstack instance:
#settings.py
from django_bookstack import bookstack
instance = bookstack.BookStackInstance(
'https://bookstack.example.com',
'*********** token id ***********',
'********* token secret *********'
)
bookstack.library.register_instance(instance, 'instance_name')
- Include the django_bookstack URLconf in your project urls.py like this:
#urls.py
urlpatterns = [
...,
path('/', include('django_bookstack.urls')),
]
- The content should be accessible at:
/bookstack/(?P<type>books|pages|chapter|shelves)/(?P<instance_name>[^/]+)/(?P<object_id>[1-9][0-9]*)/?