Smooth profiling in Django

In this article, we are going to make a Django profiling. It will show a great deal of information like the total number of GET requests, database queries and many other reports for your website on a URL endpoint. It is great in production because you need to keep a check on many things when your site is in production.

It is a great resource if you have to deploy a real-world project.


First of all, create a project and an app. Do some basic settings and set up the urls.

Now, install the djnago-silk package −

pip install django-silk

In, add the following lines −



We simply added it as app and a middleware and module as an app.

In project's

urlpatterns += [path('silk/', include('silk.urls',

Here we defined the endpoint where we will see profiling.

Now run these commands −

python makemigrations
python migrate

These commands are for creating silk migrations and to migrate them.

With that, everything is set and you can proceed to check the output.


Go to