Using Inspectr with Django
Django is a popular Python web framework for building robust applications. Inspectr lets you debug HTTP traffic and expose your local Django server for webhook testing.
This guide walks you through using Inspectr with a Django project.
Prerequisites
Section titled “Prerequisites”- Python 3.8+
- Django installed (
pip install django) - Inspectr installed (Install guide →)
Step 1: Create or Start a Django Project
Section titled “Step 1: Create or Start a Django Project”If you don’t have one already, create a new project and start the development server:
django-admin startproject mysitecd mysitepython manage.py runserver 8000Your app will be available at http://localhost:8000.
Step 2: Run Inspectr as a Proxy
Section titled “Step 2: Run Inspectr as a Proxy”inspectr --backend=http://localhost:8000Send a request via Inspectr:
curl http://localhost:8080/Requests will be forwarded to Django and displayed in the Inspectr App UI at http://localhost:4004.
Optional: Expose Django Publicly
Section titled “Optional: Expose Django Publicly”inspectr \ --backend=http://localhost:8000 \ --expose \ --channel=django-demo \ --channel-code=django123Your public endpoint will be:
https://django-demo.in-spectr.devSummary
Section titled “Summary”Inspectr helps you debug Django applications by capturing requests, replaying them, and exposing your local server for external integrations.
//: # (* Quick Start →) //: # (* Exposing Publicly →) //: # (* Webhook Debugging →)