Django Status Page is a Django plugin which allows you to easily embed status pages into your Django project.
Install python packages:
pip install djangostatuspage
This will install the plugin and all dependency packages, e.g. Django REST Framework.
Add "rest_framework" and "djangostatuspage" to your INSTALLED_APPS setting (
settings.py
) like this:INSTALLED_APPS = [ ... 'rest_framework', 'djangostatuspage', ]
Include the API URLconf in your project
urls.py
like this:path('api/statuspage/', include('djangostatuspage.urls')),
Include the UI URLconf in your project
urls.py
like this:path('ui/', include('djangostatuspage-ui.urls_ui')),
Run
python manage.py migrate
to create the Status Page models.Start the development server:
python manage.py runserver
To manage your Status Pages, visit the Django Admin at http://127.0.0.1:8000/admin/ (you'll need the Admin app enabled and superuser created).
To view actual status page, visit http://127.0.0.1:8000/ui/status-pages/(status-page-id)/
Status page API endpoints are available at: http://127.0.0.1:8000/api/statuspage/
Add DJANGOSTATUSPAGE
dictionary to your project's settings.py
:
DJANGOSTATUSPAGE = {
'UI_TEMPLATE': 'djangostatuspage/status_page.html',
}
$ python setup.py sdist
$ python -m pip install --upgrade twine
$ python -m twine upload dist/*