r/django • • May 12 '26

2026 Django Developers Survey

Thumbnail djangoproject.com
40 Upvotes

r/django • • 15h ago

Looking for Like-Minded Tech Friends & Long-Term Development Partners | Building Projects Together 🚀

Thumbnail reddit.com
3 Upvotes

r/django • • 22h ago

I built a Django REST Framework SaaS boilerplate to stop rebuilding the same backend foundations

0 Upvotes

Hey everyone!

I've been working on a developer product called Backend LaunchKit.

As a full-stack developer working with Django REST Framework, I found myself repeatedly setting up the same backend foundations whenever starting a new SaaS project.

So I decided to build a reusable starter kit.

What's included:

  • Multi-tenant architecture
  • Authentication foundations
  • Stripe integration
  • Reusable project structure
  • Automated test suite (318 passing tests in the latest audited release)

The idea is to give developers a head start when building SaaS products with Django REST Framework instead of starting from scratch every time.

Pricing: $39 one-time payment.

I'm launching this as an independent developer product, and I'd genuinely appreciate feedback.

A question for other developers here:

What's the one backend feature you hate implementing from scratch every time you start a new SaaS project?

Product: https://whop.com/karki-labs/drf-launchkit/

Thanks for reading!


r/django • • 2d ago

Django fixes a GeoDjango file write that can reach code execution (CVE-2026-124827)

Thumbnail hol.org
5 Upvotes

r/django • • 1d ago

Pythonanywhere.com y Django.

0 Upvotes

¿Porque es tan dificil hacer correr una aplicación de Django en pythonanywhere.com? Alguien tiene un instructivo. Estoy dispuesto a pagar la cuota minima.


r/django • • 2d ago

GSoC 2027 with Django: Call for Mentors and Projects

Thumbnail djangoproject.com
3 Upvotes

r/django • • 2d ago

Made a VS Code extension that catches frontend calls to Django URLs that don't exist

1 Upvotes

Hey, this is my first time but I built a VS Code extension.

I kept getting bitten by stuff like the frontend calling /api/auth/login while Django serves /api/auth/login/. GET works thanks to the redirect, but POST might break...

Django FetchLens loads your actual URL config (runs django.setup() and walks the resolver, no regex guessing), then:

  • lists all your routes in a sidebar, and clicking one opens its view
  • shows which view handles each fetch/axios call, with ctrl+click to jump there
  • warns about wrong routes, wrong methods and missing trailing slashes, with a quick fix for the slash

Marketplace: https://marketplace.visualstudio.com/items?itemName=jammiguelyfish.django-fetchlens

Source: https://github.com/jammiguelyfish/django-fetchlens

Any and all feedback is welcome. Thanks in advance!


r/django • • 2d ago

Article Django4Shell (CVE-2026-124827): GeoDjango RasterField file write

4 Upvotes

If your app has a GeoDjango RasterField that users can submit (admin, ModelForm or writable serializer), a crafted value can make GDAL write a file to any path. Django says that could lead to RCE.

Affected: 6.1 before 6.1.4, 6.0 before 6.0.11, 5.2 before 5.2.20. A public PoC exists.

Two breaking changes in the fix: RasterField is now editable=False by default, and non-default GDAL drivers raise GDALException.

How to check and full details: https://haxset.com/blog/django4shell-geodjango-rasterfield-vulnerability-affected-versions-fix


r/django • • 2d ago

One 10-row route, one process: 1,875 req/s with Django, 5,499 with Django-Bolt and quickset

0 Upvotes

On my laptop, one Django-Bolt 0.13.0 process served a 10-row PostgreSQL route at 2,745 requests/sec. With quickset it served 5,499 in the same run, with the same response bytes. The 1,875 in the title is plain Django under gunicorn in a separate run; moving that route to Bolt is part of that comparison.

The route still returns a Django QuerySet. At startup, quickset records the SQL Django builds. Each request binds its own values and fetches fresh rows. If the view branches on a request parameter or reads date.today(), quickset leaves it on the normal Django-Bolt path.

I built quickset with AI assistance and used it to edit this post. make bench-released reproduces the Docker comparison. https://github.com/YasserShkeir/quickset


r/django • • 3d ago

Django security releases issued: 6.1.4, 6.0.11, and 5.2.20

Thumbnail djangoproject.com
33 Upvotes

r/django • • 3d ago

how do you handle seeding dev data that stays realistic as models change?

6 Upvotes

on a mid sized django project we keep breaking our fixtures every time a model changes, and half the team has stopped using them. i've seen factory_boy, custom management commands and loading a scrubbed prod dump. what actually held up for you over a year or two, and how do you keep it from rotting?


r/django • • 3d ago

Hosting and deployment Lightweight Django monitoring without running Prometheus or Grafana

Post image
29 Upvotes

I've been building StatLite, an open-source monitoring dashboard for applications running on small servers and VPSs.

I just added native Django support using django-prometheus. Instead of running a separate Prometheus server, StatLite reads the metrics endpoint directly and stores the history in SQLite.

It tracks HTTP requests, errors, average latency (with a separate metrics listener), process CPU and restarts where available.

StatLite itself is a single Go binary using around 12 MiB of idle RAM.

There are two supported Django configurations: an inline metrics endpoint for basic HTTP monitoring, or a separate listener for latency monitoring as well.

I'd be interested in feedback from people running Django on small VPSs.


r/django • • 2d ago

Why is there no Django Rust like Laravel Rust ?

0 Upvotes

I've been wondering why we don't see something similar to Laravel Rust in the Django ecosystem.
Given how popular Django is, why hasn't there been a serious effort to build a completely new web framework inspired by Django in Rust or Go?


r/django • • 4d ago

Welcome Our Executive Director

Thumbnail djangoproject.com
32 Upvotes

r/django • • 3d ago

Apps celery beat died after a deploy and nothing noticed it for 4 days

6 Upvotes

I'm running a small django app for the client. One VPS with docker compose gunicorn, a celery worker, celery beat, redis, postgres. Beat sends me the weekly invoice reminders and there's a night cron jobs that expires old trial accounts.

recently I changed the compose file to pin the redis version and redeployed but the beat container exited on start with a permission error on celerybeat-schedule because the volume got recreated owned by root also that one service had no restart policy (that's an old copy paste my fault). Worker and web running fine.

but then I found out on saturday when client asked why trial users from two weeks ago could still log in.

and the most annoying part is that my monitoring looked perfect the whole time. Dotcom Monitor logs in as a test user and loads the dashboard every few minutes which has been great for the web side but beat being dead doesn't change a single page. Sentry had nothing either since a task that never gets scheduled never throws.

I fixed the ownership put restart (unless-stopped) on everything and moved the schedule file to /tmp so it doesn't depend on the volume. What I still want is something that tells me when a periodic task hasn't run.

Options I'm thinking aboutis to setup a last_run row each task updates plus a small view that returns 500 when it's older than expected (then the outside check I already have can just watch that URL) also switching to django-celery-beat with the DatabaseScheduler or a healthchecks-style ping at the end of every task.

What are you doing for this? Is the last_run view reasonable or am I just reinventing something that already exists?


r/django • • 3d ago

Hosting and deployment Deploying Django on a small PaaS: migrations, collectstatic, gunicorn workers and Celery. What would you have done differently?

6 Upvotes

Disclosure: I work on Faable, a small PaaS (not linking it). Django is one of the stacks we detect and run without a Dockerfile, and a few of the defaults we picked are ones I keep second-guessing. I'd like to hear how people who run Django in production handle them.

1. Migrations don't run on deploy. We left migrate out of the release on purpose: you run it as a one-off task against the live environment when a release needs it. The cost is obvious. Sooner or later someone ships code that expects a column that isn't there yet. Do you run migrate in a release phase, in the container entrypoint, or by hand? And if it's automatic, do you keep migrations backwards-compatible (add first, remove one release later) or just accept a few seconds of errors?

2. collectstatic runs at build time, and a failure doesn't fail the build. If it breaks, the build carries on without staticfiles/ and logs it. We did that because a missing env var in settings would block an otherwise fine deploy. What you get instead is a site with no CSS and a green deploy, which is arguably worse. Would you rather the build failed?

3. One gunicorn worker on the smallest instance. At 512 MB, two workers of a Django app with a few heavy imports get OOM-killed, so if the start command asks for --workers 2 --threads 4 we run it as --workers 1 --threads 8 and say so in the log. Threads share memory, but you have to think about DB connections per thread and code that isn't thread-safe. Do you use gthread with Django in production, or go async/uvicorn, or just pay for the RAM and keep sync workers?

4. No Celery in the same app. A background worker is a second app from the same repo with its own start command, and periodic jobs are cron schedules that run a management command in a separate instance, even while the web app is asleep. For small projects that covers most of what people use Celery + Redis + beat for. Have you dropped Celery for cron + management commands (or django-q, Huey, the new tasks framework) on small projects, and where did that stop being enough?

I'm mostly interested in what bit you in production, not in which host is best.


r/django • • 4d ago

Welcome Our Executive Director

Thumbnail djangoproject.com
9 Upvotes

r/django • • 4d ago

I built a linter that catches Django migrations that would lock your tables in production

7 Upvotes

I maintain django-safe-migrations, and 0.8.1 just came out. It reads your migration files without a database and flags operations like building an index without CONCURRENTLY on PostgreSQL or changing a column type in a way that rewrites the table. Each finding suggests a safer way to write the migration.

In CI, --diff checks just the migrations changed on your branch. A baseline file lets you accept existing findings. If you want to start with one rule, ENABLED_RULES lets you choose which checks run.

Install with pip install django-safe-migrations, add it to INSTALLED_APPS, then run python manage.py check_migrations.

https://github.com/YasserShkeir/django-safe-migrations

What migration has bitten you in production? I'm collecting patterns for new rules.


r/django • • 4d ago

Did anyone here attend interview recently?

3 Upvotes

Wanted to figure out how interviews might be. I am an experienced Django dev. Not sure leetcode is relevant anymore. Also not sure if Django concepts are focused on.

Any inputs would be great. Please share your thoughts.


r/django • • 4d ago

REST framework Cant capture 500 error from external api in try/except block

4 Upvotes

In my DRF app im trying to capture 500 errors from an external api we hit so i can log them appropriately. Pseudo code:

error_logger("test")
try:
    external_api_route.get()
except Exception:
    error_logger("could not connect to external api")

The first logger call logs the test message just fine, but i cant get the second to do any logging.

The actual error is a requests.exceptions.ConnectionError, but i used a broad Exception just to make sure i wasnt missing anything while debugging.

Originally the error was happening on startup (hence why i was able to see the ConnectionError), but i refactored the code so an external api error doesnt bring down my entire app. But since doing so im unable to see the stack trace in any of my logging.

Is something in DRF/django intercepting these 500 errors from the external api? And if so how can i intercept them back?


r/django • • 4d ago

🚀 PSP (Python Scaffolding Projects) v0.11.0 Released!

Post image
0 Upvotes

r/django • • 5d ago

Short lessons on what Django 6 adds: Tasks, template partials, fetch modes, CSP, Mailers

Thumbnail conceptual.fyi
19 Upvotes

This is for anyone with a working Django app who has read the 6 release notes and not used most of it yet. You still run Celery for one email job, your HTMX fragments live in a dozen tiny include files, and an N+1 query turned up in production again.

I built this. It's free, and it's organized short lessons with questions after each one. You can pick out any part as your goal, knowing that I make sure you are prepared to learn it. Sign in to save your progress (I'm working on the "learn anonymously" feature, let me know if you have suggestions on how to do that, I was thinking of saving to local storage in the browser)

It covers template partials for HTMX fragments, fetch modes, a nonce-based Content Security Policy and Mailers. The concepts you already know get skipped. No notifications, no streaks (no melodramatic green owls)

FAQ: for those wondering about the ~288 hours. That's if you don't know Programming/Python/SQL/etc... it will take you longer. I'll ask 5 questions to get you started learning something you don't know toward your goal.


r/django • • 5d ago

REST framework django-smart-ratelimit 4.13 is out: async middleware fix, blocked clients get back in, thread-safe Memcached

3 Upvotes

django-smart-ratelimit 4.13 is out. It's my rate-limiting library for Django: a decorator, middleware or DRF throttle, with sliding/fixed window, token bucket or leaky bucket, on Redis, the database, Memcached, MongoDB or memory.

The 4.12.2 and 4.13 releases came out of a full audit. The fixes that matter most:

  • Async views under ASGI work with the middleware. It crashed every async view ('coroutine' object has no attribute 'status_code'). Per-user keys and user tiers on async views no longer raise SynchronousOnlyOperation.
  • Rejected requests no longer count. A client that kept retrying while blocked on a sliding window was never let back in. Now it gets back in when the window clears, as documented.
  • Correct Retry-After**.** On sliding windows and token buckets it could be too short or just wrong, so clients that waited were rejected again.
  • Memcached is thread-safe. It shared one socket between threads and lost counts under load. It now uses a connection pool.
  • Backends recover on their own. A Redis or MongoDB server that was down at startup stayed disabled until a restart; now it reconnects. The multi-backend no longer fails every call after one transient error.
  • Circuit breaker fixes. It could get stuck half-open, and @circuit_breaker on an async def never opened.
  • Documented settings that were ignored now work: RATELIMIT_ALGORITHM for the decorator, and RATELIMIT_BACKEND_CONFIG.
  • Security: a signed-in user could use the X-Tenant-ID header to spend another tenant's quota. The user's own tenant now comes first.
  • Ops: ratelimit_health now exits 1 when the backend is down, so Kubernetes probes can fail. Before, it always exited 0.

New:

  • hit() / ahit(): an atomic "count this request only if it fits" call for backend authors.
  • ratelimit_cleanup --events-days N deletes old logged events.
  • A check --deploy warning when X-Forwarded-For is trusted without a proxy setting.
  • MAX_POOL_SIZE for Memcached.
  • Django 6.1 and Python 3.15 support. Django 3.2+ and Python 3.9+ are still supported.

Upgrading: no public name was removed. Helpers nothing used now give a deprecation warning and go in 5.0. Two configurations change behaviour, both because they now do what the docs said: a bucket algorithm set globally in RATELIMIT_ALGORITHM, and RATELIMIT_BACKEND_CONFIG.

Thanks to the GitHub users who reported the async crash and the rejected-request counting.

pip install -U django-smart-ratelimit

Changelog: https://github.com/YasserShkeir/django-smart-ratelimit/blob/main/CHANGELOG.md Repo: https://github.com/YasserShkeir/django-smart-ratelimit


r/django • • 6d ago

Apps I built a pytest plugin that checks Django views against Postgres row-level security (rlsparity 0.2.1, alpha)

1 Upvotes

If you use Postgres RLS behind your Django permission checks, there is a quiet failure mode: the view and the policy disagree, RLS hides it, and nobody notices until RLS is off (a script, a migration, a bad role). Then the view serves rows it should not.

rlsparity is a pytest plugin for that. For each (user, endpoint, row) you declare, it runs the view with RLS bypassed and checks whether the same user can see the row with RLS enforced. View returns it but the policy hides it: GAP, test fails. View is stricter than the policy: STRICTER, reported but not a failure.

0.2.1 can check detail, list and write endpoints, including DRF and paginated lists. It can also check a model on a non-default database alias. It prints any GRANTs the probe roles still need as SQL you can paste, writes a JSON report, and gives a clearer error when a table, privilege or role setup is wrong. Role setup is safe to share across parallel test workers.

Things it does not do: it only checks the cases you write, it does not parse policies or views, write checks replay a single statement, and with DRF it skips the real auth classes. It is an alpha, so expect API changes.

pip install rlsparity, repo and docs: https://github.com/driftwright/rlsparity

I am looking for feedback from people who actually run RLS with Django. What would make this useful for your setup?