- Data Structure
- Networking
- RDBMS
- Operating System
- Java
- MS Excel
- iOS
- HTML
- CSS
- Android
- Python
- C Programming
- C++
- C#
- MongoDB
- MySQL
- Javascript
- PHP
- Physics
- Chemistry
- Biology
- Mathematics
- English
- Economics
- Psychology
- Social Studies
- Fashion Studies
- Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Django runtime system check
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.
Example
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.
Output
On http://127.0.0.1/watchman/dashboard/ −