While creating a Django website, sometimes you want a URL endpoint from where you can check your database, cache, and storage. In such cased, we can use a third-party package to keep a check on your system performance and other things and you can check your system even in production.
In this article, we are going to make a URL endpoint which will give us system check.
First of all, perform all the basic settings of apps and urls.
Next, install the django-watchman package −
pip install django-watchman
Now, in settings.py, add this −
INSTALLED_APPS = ( ... 'watchman', )
This will simply add watchman as an app in our django project.
In urls.py, add the following line −
urlpatterns += [path(r'watchman/', include('watchman.urls')),]
t will define the URL endpoint where we have to go to see our system check.
With that, you are all done. Now, let's check the output.