wrap-existing-django-in-electron

Wrap a Django project in an Electron shell with a bundled Python runtime.

15|1|Updated Mar 21, 2026
One-click install
npx skills add https://github.com/ephes/desktop-django-starter --skill wrap-existing-django-in-electron
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: wrap-existing-django-in-electron
Source: https://github.com/ephes/desktop-django-starter/tree/main/skills/wrap-existing-django-in-electron
Command: npx skills add https://github.com/ephes/desktop-django-starter --skill wrap-existing-django-in-electron

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Wraps an existing Django project in an Electron shell to ship a desktop application with a bundled Python runtime.

Core Features & Use Cases

  • Provides a deterministic workflow to copy and adapt the starter's Electron integration into a target Django repo.
  • Enables per-session shell-to-Django auth token path for health checks and request origin checks.
  • Supports flat settings split (base_settings.py, packaged_settings.py) and packaged static/media serving for packaged runtimes.

Quick Start

Copy the starter's electron/ shell into the target and adapt paths, app identity, and settings as described.

Frequently Asked Questions about wrap-existing-django-in-electron

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I wrap an existing Django web application into a desktop application?

To wrap a Django web application into a desktop application, you can use an Electron shell with a bundled Python runtime. This approach packages your server-rendered Django app to run locally while preserving existing URLs, migrations, and seed data.

Can I bundle a Python runtime with Electron to run a Django project locally?

Yes, you can bundle a packaged Python runtime within an Electron shell to execute a Django project locally. This configuration supports flat settings files and packaged static/media serving to ensure the application functions correctly in a desktop environment.

How do I secure communication between an Electron shell and a local Django backend?

To secure communication between an Electron shell and a local Django backend, you can enforce a minimal boundary by starting Django on 127.0.0.1 with a random port and injecting a per-session DESKTOP_DJANGO_AUTH_TOKEN header for exact-origin requests.

Does wrapping Django in Electron preserve existing authentication and database migrations?

Wrapping Django in an Electron shell preserves existing authentication, seed data, URLs, and database migrations. The integration targets server-rendered Django apps and includes a small desktop auto-auth guard to maintain existing security workflows.

What is the best way to implement a health check endpoint for a Django desktop application?

The best way to implement a health check for a Django desktop application is to implement a /health/ readiness endpoint. This allows the Electron shell to verify the local Django server has fully started before attempting to load the application interface.

How do I configure Django settings for a packaged desktop runtime environment?

To configure Django settings for a packaged desktop runtime, split your configuration into base_settings.py and packaged_settings.py. This flat settings split ensures static serving and media handling are correctly configured for the bundled runtime environment.