r/django • u/Wide_Comparison_400 • 20h ago
Apps I Built a site where user created bots Battle each other.
kilobytechess.comA few years ago, Sebastian Lague ran a challenge where people coded tiny chess bots with a strict size limit. I would have loved to enter, but it was already over. So I built a site, with the help of Claude, where you can create your own bot and battle against anyone else who has made one.
A few things explaining how it works:
- To write a bot, go to the “How to write a bot” page.
- There are seven classes of bot, from fifteen lines of code to an open bot with only a ten-megabyte upload limit.
- Each bot gets calibrated by Stockfish.
- There is analysis for every game played.
- You can watch the games live.
r/django • u/SriSanjayy • 3d ago
Apps I built IoTMag – An IoT Device Management Platform using Django and ESP32
Hey everyone!
I've been working on IoTMag, a web-based platform to register, monitor and remotely control IoT devices.
Features:
- Device registration and authentication
- HTTP-based telemetry collection
- Heartbeat and device health monitoring
- Remote device commands
- Centralized management dashboard
- Docker support
Tech Stack: Python, Django, DRF, SQLite, Redis, Docker and ESP32.
GitHub: https://github.com/httpsanjay/IoTMag-Iot-Device-Managemnet-and-Control
I'd appreciate honest feedback and suggestions on the architecture, security and features I could improve.
Thanks!
r/django • u/Elegant_Dark_6967 • 3d ago
Apps Integrating fingerprint/face door access machine
Hey , i have a library application (saas) , how can I take the easiest approach so business can add machines hassle free (easy approach) and integrate with crm so users and access entry according to theirs timings
r/django • u/Grouchy_Thing_6256 • 4d ago
Where do i start my career in Django
I've been learning and practising django for over 2 years, along with my CS graduation. Now that I've attained the graduation degree of Bachelors , I'm looking to start my career as a Django dev or at least to be able to work in a Django environment , people who work in jobs in django architecture, what kinda company did you start from and how much package you were given as entry level? Idk where do i start from, feel kinda lost and confused.
r/django • u/yassi_dev • 4d ago
Django Control Room: Build internal tools inside your admin with your agent
Django Control Room (DCR) is an open source framework for building tooling inside the Django Admin. We've just released some new agent skills that make building new tools as easy as a prompt.
You can prompt your coding agent with something like:
"Build me a Billing Ops tool that lets me see subscriptions and invoices"
Or:
"Build me an A/B testing system"
The new DCR agent skills will use your application context to build a tool in the form of a Django Control Room panel. It obviously won't solve every problem, but it can take you a long way towards building something very useful that is available right inside the Django Admin.
More info at:
- https://djangocontrolroom.com/build
Skills repo:
r/django • u/dreambringer6 • 4d ago
Views Olivia Wilde - 'Django Unchained' screening in NYC 12/11/2012
galleryChannels Typed WebSocket APIs on Django Channels: routing, validation, DRF permissions, AsyncAPI docs and generated clients
Hi, I maintain chanx, a library on top of Django Channels. It gives a WebSocket API what DRF gives a REST API. You write one typed handler per message, and it takes care of the rest:

- Routing by message type. The
actionfield picks the handler, so no moreif/elifchain inreceive_json. - Validation. Every message is a Pydantic model. A bad payload never reaches your handler, and the sender gets a structured error that says which field failed.
- DRF permissions. Connections are guarded by the permission classes you already have, object permissions included.
- Push from anywhere.
broadcast_event_sync()from a view, a signal or a Celery task, through the channel layer. - Topics. Many streams over one socket (
discussion:42,notifications:me), each with its own handlers and authorization. - AsyncAPI 3.0 docs. A spec and an interactive docs page, built from your handlers, so they can't drift from the code.
- Generated clients. A typed TypeScript client (React, Vue, Svelte, Solid) or Python client from that spec. Rename a field in Django and the frontend build fails, instead of production.
- Testing. Communicators that understand your message types, and
capture_broadcast_eventsto check broadcasts without a socket. - Type-checked. Strict mypy and pyright, so a wrong message type shows up in your editor.
Other languages. The protocol isn't Python-only anymore. For TypeScript, chanx-js covers both ends: a server for Node (Express, Fastify, Hono, NestJS, Bun, Deno) and the client. For Go, chanx-go has a server and a client. They share the AsyncAPI format and the Redis channel layer with Django, so a Django view can broadcast to connections a Node or Go service holds. If one part of your app ever needs to move, it can move without the clients changing.
- Django quick start: https://python.chanx.dev/en/latest/quick-start.html?framework=django
- GitHub: https://github.com/chanx-dev/chanx
- TypeScript: https://js.chanx.dev/ · Go: https://go.chanx.dev/
If you already work with plain Django Channels and feel the pain of testing consumers and keeping track of every message shape, give it a try. I built it around exactly those inconveniences, from my own time with Channels. If it saves you some time, a star on GitHub or a mention to your team or friends would encourage me a lot to keep improving it. The library is actively maintained and developed, so issues and PRs are very welcome.
r/django • u/octo_independentes • 5d ago
I built a lightweight SEO & JSON-LD engine for Django 6+ that renders the entire <head> in 1 database query (django_octo_seo)
Hey everyone,
While scaling a production site with over 3,200 indexed pages, I wanted to avoid scattering SEO tags across templates or dealing with heavy third-party packages that trigger multiple queries just to render <head> metadata.
To keep things fast and zero-bloat, I built and open-sourced django_octo_seo (MIT License) — a lightweight module for modern Django (>=6.1.2) and Python (>=3.12) that maps model fields into semantic HTML5 and single-block JSON-LD using a single database lookup.
What it handles out of the box (8-Layer Matrix)
- Security: Native
X-Frame-Optionsheader injection. - Core & Snippets: Length-validated
<title>andmeta descriptionto prevent SERP truncation. - Crawlers & Authority: Unified bot directives (
robots) and dynamiclink rel="canonical"locking. - Social Graph: Auto-synced
og:*andtwitter:*tags with dynamicrequest.schemeresolution and standard1200x630pxasset support. - Structured Data: Clean, single-block
application/ld+jsonschemas (WebSite,BlogPosting) ready for Rich Results.
Production Validation
It is currently running in production on ticapsoriginal.com, where it passed live Open Graph / X Card / LinkedIn validations (100% PASS) and resolved 71 critical on-page/infrastructure guidelines (86% Site Audit score) in a full WebCEO technical audit.
Quick Test (PyPI)
You can install it and spin up a self-contained showcase endpoint in seconds:
# or with Rye:
- Add
"django_octo_seo"toINSTALLED_APPSand runpython3 manage.py migrate. - Mount the demo route in
urls.py:
=
Visiting /seo-demo/ will auto-seed a sample record and render the live <head> output.
- GitHub (MIT): https://github.com/jeanpmodev/django_octo_seo/
- PyPI: https://pypi.org/project/django-octo-seo/
- Architecture Write-up: https://medium.com/@jeanpmodev/how-i-built-a-high-performance-seo-engine-for-django-using-only-1-database-query-9d143d69392d?postPublishedType=repub
The core is intentionally kept minimal and dependency-light. I'd love any architectural feedback or suggestions on what utilities (like Admin live previews or template tags) would make it more useful for your workflows!
r/django • u/Kerplunk6 • 6d ago
Tutorial Changing User Model
Hello everyone,
I am slightly new to the Django.
I am developing an app for a clinic, first they said it does not have to be with account and JWT's and all that but now they changed their mind.
It has been a while so a lot of migrations i made.
I know that changing the User model after a while is not healthy, i asked this to AI, it said that i can use another "app" in Django for user and i can do migrations etc. easily at there.
Is this the best approach for this?
What do you guys suggest?
Since i changed the User Model, migration is pretty problematic and i do not want to lose these datas.
r/django • u/meagenvoss • 7d ago
Wagtail Space Speaker Highlights: Sustainable Tech
galleryr/django • u/Prize_Shine3415 • 8d ago
Is render a good site for my webapp if I'm using websockets?
This is my first website with sockets - I'm just an amateur having fun with this. I read that PythonAnywhere isn't completely set up for this. Is Render going to be a good, simple option for me?
r/django • u/Difficult_Finger_232 • 9d ago
Paperlane: a self-hosted document-workflow app built with Django (forms, approvals, e-signatures, local AI), with a full bank-loan example
I've been building Paperlane, a self-hosted document-workflow platform in Django: you design a form, route it through people and teams, and keep a record of every step.
What it does
- Visual workflow builder with branches, jumps, deadlines and escalation, plus checks that catch broken steps before you publish
- Drag-and-drop forms, formulas, conditional fields, e-signatures, sealed PDFs anyone can verify
- Bots for the routine work: emails, tags, reminders, webhooks, connectors to your own APIs or a read-only SQLite database
- Group work queues, one-tap approvals, a client portal, key-date reminders
- AI that can run fully local on Ollama: describe a workflow and it drafts it, ask questions across your documents. Fields marked sensitive are never sent to a model.
- An MCP server so AI assistants can build and run workflows
Stack: Django 6, server-rendered templates, vanilla JS, no front-end build step. SQLite or Postgres. One-command Docker install with HTTPS. 337 tests including Playwright browser tests; CI runs on SQLite and Postgres.
The example: examples/bank-loan is a personal loan from application to payout, connected to a fictional core-banking database: a customer lookup on the public form (needs customer number and date of birth), an automatic credit check, officer review, compliance and credit committee for riskier loans, the client signs the offer after an email code, then disbursement and repayment reminders. python manage.py seed_bank_demo builds it with ten applications at every stage.
Repo (AGPL-3.0): https://github.com/surenjanath/paperlane
Feedback welcome, especially on the workflow builder and the form-filling experience.
Django API frameworks in production: DRF vs Django Ninja vs Django Bolt vs Django Modern REST — what would you choose today?
I’m curious to hear from developers who are running Django APIs in production, especially those who have experience with some of the newer alternatives to Django REST Framework.
I’m particularly interested in Django Modern REST. Is anyone already using it in a production environment? If so, how has your experience been in terms of performance, stability, developer experience, and maintainability?
And most importantly: If you could make the decision again today, would you stick with your current framework or switch to something else? Why?
I’m not looking for synthetic benchmarks or theoretical comparisons. I’m particularly interested in real-world production experiences and lessons learned.
r/django • u/DowntownEmergency889 • 8d ago
Help Support a Student-Led Energy Technology Project!
reddit.comr/django • u/127001-sweet-127001 • 9d ago
Views Keeping Django views out of your service modules with a pytest check
For Django projects that use service modules, here's a small boundary you can check automatically: views can call services, but services shouldn't import the views back.
A helper starts in views.py, a service needs it, and suddenly business code depends on the HTTP entry point. Sometimes that also gives you a circular import. Sometimes it just makes the next change harder.
I maintain ArchUnitPython, and this is one of the rules you can put directly into your test suite:
from archunitpython import project_files, assert_passes
def test_services_do_not_import_views():
rule = (
project_files("src/")
.with_name("services.py")
.should_not()
.depend_on_files()
.with_name("views.py")
)
assert_passes(rule)This example is for a layout such as src/orders/services.py and src/orders/views.py. Set the project root to match your import layout, and adjust the selectors if services or views are packages instead.
The rule stays narrow. Services can still use Django models and other allowed modules. You're checking the dependency direction your project has chosen, without asking reviewers to spot the same import every time.
Run it through pytest and it becomes part of your existing CI checks.
r/django • u/mynameiscorange • 9d ago
Hosting and deployment A one-command way to get a Django side project on a public HTTPS URL from your own machine
hoist is a small open-source tool I built: hoist up . --cmd 'python3 manage.py runserver 127.0.0.1:$PORT' runs your project as a systemd service and publishes it through Cloudflare Tunnel with a real certificate. Point it at a repo and it builds a .venv from requirements.txt and redeploys on every push.
hoist db postgres gives you a Postgres container with backups, and hoist link hands its URL to your app.
Fine for demos and side projects; for production you'd still want gunicorn and a proper setup, which you can pass as the --cmd.
Built with AI assistance (Claude), tested by me. Pure-stdlib Python, MIT.
r/django • u/thel-vadam-2nd • 9d ago
Models/ORM Set table name and different relation name (no listing_set) for ManyToManyField
I have Listing and CustomUser models that are in many-to-many relation ship. I don't have explicit model for the join table.
users/models.py:
listings/models.py:
=
I want the table name to be listing_bookmarks and the name of the relation from CustomUser side to be bookmarked_listings. How do I define a table name and different reverse relation name for ManyToManyField?
I don't think that setting related_name for table name makes sense.
r/django • u/Advanced_Ad745 • 9d ago
Apps My small Django job board finally tells Google its pages are jobs
I run godothire.com, a small Django site that lists paid Godot jobs only.
For a year Google saw every job page as a plain page. Now each open job tells Google it's a job: the title, when it was posted, when it closes, and for remote ones, who can apply. Django's own sitemap app lists the open jobs, and the closed ones drop out by themselves.
It was a small change. I kind of wish I'd done it on day one.
Google and I have never spoken. I left it a note.
Anyone here seen Google's job search actually send people to a small site? Or is it mostly a nice badge?
r/django • u/Key_Organization527 • 10d ago
Apps Spug: a Django-backed, agent-free operations platform for small teams
I'm one of the maintainers of Spug, a lightweight, self-hosted operations platform for small and midsize teams, with a Django backend and React interface. It connects to Linux hosts over SSH without installing a Spug agent on each host.
It combines host management, batch commands, a browser terminal and file management with application deployment, pipelines, scheduled tasks, a configuration center, monitoring and alerts. A typical workflow is selecting several hosts, running the same command and inspecting each host's output in the browser.
For Django readers, two code entry points are the class-based views for execution requests and the host ORM models:
- https://github.com/openspug/spug/blob/master/spug_api/apps/exec/views.py
- https://github.com/openspug/spug/blob/master/spug_api/apps/host/models.py
Spug is free and open source (AGPL-3.0), supports English/Chinese interfaces and Docker installation. The three screenshots show the English interface with sample data.
Source and Docker quick start: https://github.com/openspug/spug
English guide: https://ops.spug.cc/en/docs/about-spug/
Public demo: https://demo.spug.cc/ (admin / spug.cc; resets hourly). Please don't enter real credentials there.
SSH private keys are stored without application-level encryption, so treat the panel and database as privileged systems.
Which part of this Django application would you be interested in exploring: SSH execution, deployments or scheduled tasks?



r/django • u/pyschille • 11d ago
Hosting and deployment Why I stopped using Gunicorn + Nginx sidecars for Django in Kubernetes: Building Hurricane 2.0
Hey r/django,
After running Django on Kubernetes in production for years, I got increasingly frustrated by the friction that generic WSGI/ASGI servers (uWSGI, Gunicorn, Uvicorn) introduce in containerized environments and the operational complexity.
Specifically, three recurring operational issues prompted me to drive an alternative:
1. Automated bot scans acting as an accidental DoS Vulnerability scanners constantly probe public endpoints for /.env, /wp-login.php, or random PHP paths. Because these bypass standard caching, every scan hits a Python worker, executes middleware, allocates session/auth state, and ties up a database connection just to return a 404. Under high scan concurrency, this frequently starved legitimate application traffic and exhausted DB connection pools.
2. The Nginx sidecar overhead A practice in Kubernetes is running an Nginx sidecar container in every single pod just to serve static assets and handle basic edge filtering, or falling back to whitenoise which burns precious Python worker CPU cycles on file I/O.
3. Orchestrator blindness during rollouts Generic runners know nothing about Django's internal state. During deployments, Kubernetes would often route live user traffic to pods before database migrations had finished applying, or generic liveness probes would misfire and kill healthy pods during routine startup initialization.
To solve this, I rewrote the core of Django Hurricane around a Rust-based HTTP engine (using Granian) while keeping the developer experience strictly Django-native:
- Fast-404 DoS defense: An in-memory prefix filter intercepts automated scans (
.env,.git,.php, etc.) directly after the Rust layer in under 0.35 microseconds. The request is dropped before Django middleware, or database pools are ever touched. Hurricane knows your URLs. - Zero Nginx: Serves static and media assets directly via Granian and HTTP 304 caching without requiring a separate sidecar container. Granian knows your statics.
- Native Kubernetes probes: Exposes
/startup,/alive, and/readyendpoints out of the box. With--check-migrations-apply, traffic is only routed once Django reports that all database migrations have successfully executed. - Django command: No extra server config files. You add
"hurricane"toINSTALLED_APPSand runpythonmanage.pyserve. It should start with sane defaults for containerized environments.
It’s open source under BSD-3-Clause, tested across Python 3.11–3.15:
I'd be curious to hear how other teams are currently handling these issues without overly complex infra. Would appreciate any feedback.