{"id":37066256,"url":"https://github.com/sjbitcode/django-cbv-inspect","last_synced_at":"2026-01-14T07:46:32.231Z","repository":{"id":46304800,"uuid":"422943544","full_name":"sjbitcode/django-cbv-inspect","owner":"sjbitcode","description":"A tool to help inspect Django class-based views","archived":false,"fork":false,"pushed_at":"2023-01-06T13:43:35.000Z","size":8830,"stargazers_count":59,"open_issues_count":1,"forks_count":1,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-09-26T03:41:05.849Z","etag":null,"topics":["class-based-views","debugging-tool","django","python","python3"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sjbitcode.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-10-30T17:10:48.000Z","updated_at":"2024-12-24T13:07:27.000Z","dependencies_parsed_at":"2023-02-06T04:30:19.828Z","dependency_job_id":null,"html_url":"https://github.com/sjbitcode/django-cbv-inspect","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"purl":"pkg:github/sjbitcode/django-cbv-inspect","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sjbitcode%2Fdjango-cbv-inspect","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sjbitcode%2Fdjango-cbv-inspect/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sjbitcode%2Fdjango-cbv-inspect/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sjbitcode%2Fdjango-cbv-inspect/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sjbitcode","download_url":"https://codeload.github.com/sjbitcode/django-cbv-inspect/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sjbitcode%2Fdjango-cbv-inspect/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28413490,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-14T05:26:33.345Z","status":"ssl_error","status_checked_at":"2026-01-14T05:21:57.251Z","response_time":107,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["class-based-views","debugging-tool","django","python","python3"],"created_at":"2026-01-14T07:46:31.668Z","updated_at":"2026-01-14T07:46:32.215Z","avatar_url":"https://github.com/sjbitcode.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003ch1 align=\"center\"\u003e\n    django-cbv-inspect\n\u003c/h1\u003e\n\n\u003cdiv align=\"center\"\u003e\n\u003ca href=\"https://pypi.org/project/django-cbv-inspect/\"\u003e\n    \u003cimg src=\"https://img.shields.io/pypi/v/django-cbv-inspect?color=blue\" alt=\"PyPI\"/\u003e\n\u003c/a\u003e\n\u003ca href=\"https://github.com/sjbitcode/django-cbv-inspect/actions/workflows/test.yml\"\u003e\n    \u003cimg src=\"https://github.com/sjbitcode/django-cbv-inspect/actions/workflows/test.yml/badge.svg?branch=master\u0026event=push\" alt=\"Test\"\u003e\n\u003c/a\u003e\n\u003ca href=\"https://codecov.io/gh/sjbitcode/django-cbv-inspect\" \u003e \n    \u003cimg src=\"https://codecov.io/gh/sjbitcode/django-cbv-inspect/branch/master/graph/badge.svg?token=wAjvQLGtpd\"/\u003e \n\u003c/a\u003e\n\u003ca href=\"https://pypi.org/project/django-cbv-inspect/\"\u003e\n    \u003cimg src=\"https://img.shields.io/pypi/pyversions/django-cbv-inspect\" alt=\"python-versions\"\u003e\n\u003c/a\u003e\n\u003ca href=\"https://pypi.org/project/django-cbv-inspect/\"\u003e\n    \u003cimg src=\"https://img.shields.io/pypi/frameworkversions/django/django-cbv-inspect.svg\" alt=\"django-versions\"\u003e\n\u003c/a\u003e\n\u003c/div\u003e\n\n\u003cbr\u003e\n\n\u003cdiv align=\"center\"\u003e\n    \u003cp\u003eA tool to help inspect all class-based views within your Django project 🔎 ✨ \u003c/p\u003e\n    Inspired by django-debug-toolbar ❤️\n\u003c/div\u003e\n\n\u003cp align=\"center\"\u003e\n    \u003cbr\u003e\n    \u003cimg src=\"https://user-images.githubusercontent.com/6550256/210189547-b173d5a6-d69f-482e-b85b-5be31098610c.gif\" alt=\"django-cbv-inspect demo\"/\u003e\n\u003c/p\u003e\n\n\u003cbr\u003e\n\n---\n\n\u003cbr\u003e\n\n## 📦 Installation\n1. Install with pip\n```\npip install django-cbv-inspect\n```\n\n2. Add `cbv_inspect` to your list of `INSTALLED_APPS` in your Django settings module\n```python\nINSTALLED_APPS = [\n    ...\n    \"cbv_inspect\",\n    ...\n]\n```\n\n3. Add the middleware to your list of `MIDDLEWARE` classes in your Django settings module\n```python\nMIDDLEWARE = [\n    ...\n    \"cbv_inspect.middleware.DjCbvInspectMiddleware\",\n    ...\n]\n```\n\n4. Make sure your `TEMPLATES` settings uses the `DjangoTemplates` backend with `APP_DIRS` set to `True`\n```python\nTEMPLATES = [\n    {\n        \"BACKEND\": \"django.template.backends.django.DjangoTemplates\",\n        \"APP_DIRS\": True,\n        ...\n    }\n]\n```\n\n\u003cbr\u003e\n\n---\n\n\u003cbr\u003e\n\n## 🛞 Usage\nWhen all installation steps are done, any html response rendered by a class-based view should display the `django-cbv-inspect` toolbar on the page.\n\nBy default, all class-based views will be processed by the middleware. If you wish to exclude views, there are two options:\n\n### Exclude via mixin\n```python\nfrom cbv_inspect.mixins import DjCbvExcludeMixin\n\n\nclass MyCoolView(DjCbvExcludeMixin, View):\n    pass\n```\n\n\n### Exclude via decorator\n```python\nfrom django.utils.decorators import method_decorator\nfrom cbv_inspect.decorators import djcbv_exclude\n\n\n@method_decorator(djcbv_exclude, name=\"dispatch\")\nclass MyCoolView(View):\n    pass\n```\n\n\u003cbr\u003e\n\n---\n\n\u003cbr\u003e\n\n## 🧪 Run locally\nYou can run the `example` project locally to test things out!\n\nClone the project and from the root of the repo, run the following Make command to setup the `example` project:\n```\nmake run-example\n```\n\nTo run unittests with coverage, run\n```\nmake coverage\n```\n\n\u003cbr\u003e\n\n---\n\n\u003cbr\u003e\n\n## ⚡️ Features\n\nThe `django-cbv-inspect` toolbar has three main sections:\n\n1. View information\n2. CBV method call chain\n3. MRO classes\n\n\n### View information\n\nThis section shows high level information about the class-based view, request, and url.\n\n\n### CBV method call chain\n\nThis is the main section that shows all methods that were excuted for the current class-based view:\n\nIt shows:\n- method name and signature\n- [Classy Class-Based Views (ccbv.co.uk)](https://ccbv.co.uk/) links\n- method arguments and return value\n- all resolved `super()` calls defined in the method\n- module location\n\n\n### MRO classes\nThis section lists all MRO classes of the current class-based view class. \n\nThis can come in handy especially with the prior section when mapping the execution of a class-based view.\n\n\u003cbr\u003e\n\n---\n\n\u003cbr\u003e\n\n## ❓ Why did I build this?\n\nDjango class-based views are hard to grasp especially when you're new to Django.\n\nFortunately for us, tools like [django-debug-toolbar](https://github.com/jazzband/django-debug-toolbar) and [ccbv.co.uk](https://ccbv.co.uk/) are super helpful in providing extra context for debugging.\n\nMy goal for this app was to take what goes on under the hood in a class-based view and display it in an easy to use interface, just like what django-debug-toolbar does.\n\nHopefully this can help debug your class-based views!\n\nHappy coding! ✨","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsjbitcode%2Fdjango-cbv-inspect","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsjbitcode%2Fdjango-cbv-inspect","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsjbitcode%2Fdjango-cbv-inspect/lists"}