Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 5 additions & 16 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,24 +1,21 @@
name: CI

on:
push:
branches: [ main ]
branches: [main]
pull_request:
branches: [ main ]

branches: [main]
concurrency:
group: ${{ github.head_ref || github.run_id }}
cancel-in-progress: true

jobs:
test:
name: Python ${{ matrix.python-version }} / Django ${{ matrix.django-version }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: [ "3.10", "3.11", "3.12", "3.13", "3.14" ]
django-version: [ "4.2", "5.0", "5.1", "5.2", "6.0" ]
python-version: ["3.10", "3.11", "3.12", "3.13", "3.14"]
django-version: ["4.2", "5.0", "5.1", "5.2", "6.0"]
exclude:
- python-version: "3.13"
django-version: "4.2"
Expand All @@ -34,37 +31,29 @@ jobs:
django-version: "6.0"
- python-version: "3.11"
django-version: "6.0"

steps:
- uses: actions/checkout@v6

- name: Install uv
uses: astral-sh/setup-uv@v7
with:
python-version: ${{ matrix.python-version }}

- name: Install dependencies
run: uv sync -p ${{ matrix.python-version }}

- name: Install specific Django version
run: uv pip install "django~=${{ matrix.django-version }}.0"

- name: Run tests
run: uv run --frozen pytest

lint:
name: Lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6

- uses: j178/prek-action@v1
- name: Install uv
uses: astral-sh/setup-uv@v7
with:
python-version: "3.14"

- name: Run ruff check
run: uv run ruff check .

- name: Run ruff format check
run: uv run ruff format --check .
6 changes: 0 additions & 6 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,25 +1,19 @@
name: Release

on:
release:
types: [published]

jobs:
publish:
name: Publish to PyPI
runs-on: ubuntu-latest
environment: pypi
permissions:
id-token: write

steps:
- uses: actions/checkout@v6

- name: Install uv
uses: astral-sh/setup-uv@v7

- name: Build package
run: uv build

- name: Publish to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
43 changes: 42 additions & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,47 @@
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v6.0.0
hooks:
- id: trailing-whitespace
- id: check-merge-conflict
- id: check-ast
- id: check-toml
- id: check-yaml
- id: debug-statements
- id: end-of-file-fixer
- id: name-tests-test
args: ["--pytest-test-first"]
exclude: ^tests\/(testapp\/|manage.py|settings.py)
- id: no-commit-to-branch
args: [--branch, main]
- repo: https://github.com/asottile/pyupgrade
rev: v3.21.2
hooks:
- id: pyupgrade
Comment thread
amureki marked this conversation as resolved.
- repo: https://github.com/adamchainz/django-upgrade
rev: 1.29.1
hooks:
- id: django-upgrade
Comment thread
amureki marked this conversation as resolved.
- repo: https://github.com/hukkin/mdformat
rev: 1.0.0
hooks:
- id: mdformat
additional_dependencies:
- mdformat-ruff
- mdformat-footnote
- mdformat-gfm
- mdformat-gfm-alerts
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.14.10
hooks:
- id: ruff-check
args: [--fix, --exit-non-zero-on-fix]
- id: ruff-format
- repo: https://github.com/google/yamlfmt
rev: v0.20.0
hooks:
- id: yamlfmt
- repo: https://github.com/codingjoe/esupgrade
rev: 2025.9.0
hooks:
- id: esupgrade

6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,9 @@ All settings are optional. Configure via a `DEVBAR` dict in your Django settings

```python
DEVBAR = {
'POSITION': 'bottom-right', # bottom-right (default), bottom-left, top-right, top-left
'SHOW_BAR': None, # follows DEBUG; set True/False to override
'ENABLE_DEVTOOLS_DATA': None, # follows DEBUG; set True/False to override
"POSITION": "bottom-right", # bottom-right (default), bottom-left, top-right, top-left
"SHOW_BAR": None, # follows DEBUG; set True/False to override
"ENABLE_DEVTOOLS_DATA": None, # follows DEBUG; set True/False to override
}
```

Expand Down
15 changes: 8 additions & 7 deletions chrome-extension/PRIVACY.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

## Overview

Django DevBar is a developer tool Chrome extension designed to display performance metrics for Django web applications during local development.
Django DevBar is a developer tool Chrome extension designed to display performance metrics for Django web applications during local development.
This privacy policy explains what data is collected and how it's used.

## Data Collection
Expand Down Expand Up @@ -43,10 +43,10 @@ This data is never stored persistently or transmitted externally.

## Permissions Explained

| Permission | Why We Need It |
|------------|----------------|
| `storage` | Store your UI preference for showing/hiding the on-page DevBar |
| Content scripts on development domains | Control DevBar visibility on localhost, 127.0.0.1, *.local, *.test domains only |
| Permission | Why We Need It |
| -------------------------------------- | --------------------------------------------------------------------------------- |
| `storage` | Store your UI preference for showing/hiding the on-page DevBar |
| Content scripts on development domains | Control DevBar visibility on localhost, 127.0.0.1, \*.local, \*.test domains only |

## Third-Party Services

Expand All @@ -57,10 +57,11 @@ Django DevBar does not use any third-party services, analytics, or tracking.
To delete all Django DevBar data:

1. Open Chrome extension settings (`chrome://extensions/`)
2. Find Django DevBar → Click "Remove"
3. All locally stored data will be deleted
1. Find Django DevBar → Click "Remove"
1. All locally stored data will be deleted

Alternatively, you can clear the extension's storage:

- Open DevTools on any page
- Go to Application → Storage → Extension Storage → Django DevBar
- Clear the stored preferences
Expand Down
11 changes: 6 additions & 5 deletions chrome-extension/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,13 @@ A Chrome DevTools extension for viewing Django DevBar performance metrics direct
**About Permissions**: Chrome shows a broad permissions warning during install, but this extension only runs on `localhost` and `127.0.0.1` for local Django development. It cannot access other websites.

**Option B - Development Mode**:

- Open Chrome and navigate to `chrome://extensions/`
- Enable "Developer mode" (toggle in the top-right corner)
- Click "Load unpacked"
- Select the `chrome-extension` directory from this repository

2. **Use the Extension**
1. **Use the Extension**

- Open Chrome DevTools (F12 or right-click → Inspect)
- Navigate to the "Django DevBar" tab
Expand All @@ -45,7 +46,7 @@ npm run generate-icons # Generate icon sizes from icon.svg
### Making Changes

1. Edit the source files
2. Run `npm run build` to update dist/
3. Go to `chrome://extensions/`
4. Click the refresh icon on the Django DevBar extension
5. Reload DevTools
1. Run `npm run build` to update dist/
1. Go to `chrome://extensions/`
1. Click the refresh icon on the Django DevBar extension
1. Reload DevTools