r/django

▲ 24 r/django

Future of programming with AI

Hello everyone. I’m a Django developer with almost four years of experience, and I’ve been using Claude Code for a while.

I see it as a tool, or even as a higher-level programming language, similar to how we evolved from binary to assembly, then to C, and eventually to Python and JavaScript.

But seriously, I can’t stop thinking about what will happen in the future. Even when AI is coding and I’m doing other things (like right now), the thought keeps coming back.

Should I start to leave tech and start a goose farm?

reddit.com
u/tonystark-12867 — 1 day ago
▲ 0 r/django+1 crossposts

Is django dead ? Really?

I was learning Machine learning 4 months ago ...but due to job pressure I stopped preparing for ml because it's a huge field and no one was hiring freshers from t3 and so started learning django as I knew python.

But one of my batchmate said like django is dead and no one is using or hiring django developer.

So I'm here to ask is django really dead? or should I continue learning or building to get hired..... please.. if know the market or youre experienced.. please give me suggestions.

Please don't ask anything like my college , college year or semester I'm already fked up.

Please help.

u/kyrezonix — 3 days ago
▲ 0 r/django

How do you handle multi-API integration with different auth methods? Here is my approach.

Hey everyone,

I’ve been working on a project that requires integrating multiple third-party APIs, each using a different authentication method (OAuth2, API Keys, Basic Auth, custom tokens, you name it).

To keep the codebase clean and avoid auth logic bleeding into my business logic, I built a custom API abstraction layer.

Here’s a quick breakdown of how it works:

  • Registration: I register each API and its required auth method in a central config/registry.
  • The Wrapper: A unified layer handles the token refreshing, header injections, and signature generation behind the scenes.
  • The Call: In my actual application code, I just call the abstraction layer (e.g., apiClient.fetch('serviceName', endpoint)), and it automatically handles the specific auth handshake.

It’s working great so far and keeps everything decoupled, but I’m curious about how others tackle this as the project scales.

What’s your go-to approach? > * Do you build custom wrappers like me?

  • Do you rely on specific design patterns (like Gateway or Factory)?
  • Or do you use a third-party library/tool to manage this overhead?

Let’s discuss!

reddit.com
u/ELMG006 — 2 days ago
▲ 14 r/django

Your Celery worker can show "up" while it quietly stopped consuming from Redis

This one bit a service of mine and it's worth a PSA, because every signal you have lies to you while it's happening.

The scenario: a Celery worker loses its Redis connection for a moment (managed Redis idle timeout, a network blip, a reset). Celery logs it, once:

consumer: Connection to broker lost. Trying to re-establish the connection...

And then it just... doesn't. The process stays alive, your orchestrator shows it green, redis-cli ping works fine, and no exception ever reaches your app. But the worker never consumes another task. The queue grows in silence until somebody restarts the container.

If you think this is ancient history, two reports from May 2026 that are still open:

  • celery/celery#10303 — worker on Azure Redis takes a Connection reset by peer, logs the reconnect attempt, never recovers. Reporter says it was "fixed" in 5.6.3, upgraded, still hits it.
  • celery/celery#10325 — DigitalOcean Managed Redis, stalls for exactly the idle-timeout interval, reproduced on 5.4.0 / 5.5.3 / 5.6.3 / main. The part that got me: they already had health_check_interval, socket_keepalive and retry_on_timeout set, and it stalled anyway. Why nothing catches it: no exception, so error-rate alerts stay quiet. Process alive, so the liveness probe passes. Redis healthy, so a broker check passes. The only thing that moves is queue depth creeping up, which is the one noisy signal most teams never alert on.

Settings that help (set them, but they are not a guarantee, see #10325):

  • broker_transport_options with socket_keepalive + health_check_interval ~25
  • broker_connection_retry_on_startup=True, broker_connection_max_retries=None
  • worker_cancel_long_running_tasks_on_connection_loss=True (becomes the default in 6.0) The thing that actually catches it: stop monitoring "is the worker up" and start monitoring "did a task complete recently." Poll inspect active / inspect stats, track the last-completed timestamp per worker, and alert when a worker goes quiet while its queue is non-empty. Active empty + queue not empty = ghost.

Anyone else run into this? Curious how people detect it beyond a queue-depth alarm, especially on managed Redis.

reddit.com
u/herchila6 — 3 days ago
▲ 10 r/django+3 crossposts

Career Guidance For 4th semester student !!

Hi everyone,
I’m a Software Engineering student at a university in Lahore. I’ve completed 4 semesters and gpa also not good :( and I’m currently on my summer break, so I want to make the most of this time by focusing on the right skill.
So far I’ve learned HTML, CSS, React, and Django, and I can build basic projects. But almost everyone around me is learning the MERN stack, which makes me wonder if Django is still a good long-term choice.
My goal is to get internships, freelance work, and eventually a software engineering job.

Should I:

Stick with Django + React?
Switch to MERN?

Or consider a different path altogether?
If you were in my position in 2026, what would you focus on?

Guide me that does GPA really does matter and
Also guide me through the career path so i can choose that path.

I’d really appreciate honest advice from people in the industry. Thanks!

reddit.com
u/bobbybhaai — 4 days ago
▲ 32 r/django+39 crossposts

Made a free iOS app to open and read raw Markdown (.md) files on iPhone/iPad — handy for peeking at Logseq pages outside the app

Logseq stores everything as plain .md files, but if you ever open one of those files directly on iOS (from Files, iCloud, Dropbox, a backup, etc.) you just get raw text. I built a small viewer to read them rendered on a phone.

Md Preview:

• Renders GitHub-Flavored Markdown — headings, tables, task lists, footnotes

• Code blocks with syntax highlighting, plus LaTeX math and Mermaid diagrams

• Opens .md / .markdown / .mdx / .rmd / .qmd from Files or the Share Sheet

• 100% on-device — no account, no uploads, no ads, no subscriptions

Free on the App Store: https://apps.apple.com/app/id6760341080

Details: https://markdown.cybergame.ai/

Not a Logseq replacement at all — just a quick way to read loose .md files when you're away from the desktop app. Curious how you all read your graph on the go.

u/Fujima4Kenji — 6 days ago
▲ 10 r/django

Brilliance Admin Panel - added django support

This is a plug-in admin panel built on vue + vuetify

Live Demo | Docs + Showcase | Github

Demo location - Germany

New 0.45.19 features - formsets, inlines, and subcategories.

I'm doing it now for use in my own products, but if anyone is interested and uses it, I'll be glad, and suggestions are welcome.

CRUD category example:

from brilliance_admin import schema, django

class UserAdmin(django.DjangoAdmin):
    model = User

    slug = 'users'
    title = 'Users'
    icon = 'mdi-account'

    search_fields = ['username', 'email']
    ordering_fields = ['id', 'created_at']

    table_schema = django.DjangoFieldsSchema(model=User)
    table_filters = django.DjangoFieldsSchema(
        model=User,
        created_at=schema.DateTimeField(range=True),
    )

The main feature is the ease of adding actions to entries. Custom action example:

    @admin_action(
        title=_("password.change_password"),
        form_schema=schema.FieldsSchema(
            new_password=schema.StringField()
        ),
    )
    async def change_password(self, action_data: ActionData):
        new_password = action_data.form_data["new_password"]
        hashed_password = UserDAO.hash_password(new_password)
  
        await User.objects.filter(pk__in=action_data.pks).aupdate(password=hashed_password)
  
        return ActionResult(message=ActionMessage(_("password.password_changed")))
reddit.com
u/initsbriliance — 4 days ago
▲ 5 r/django

Django Dokploy deployment

What is the easiest way to deploy a django project on dokploy. I’m a beginner and I’m now learning the tool. Are there resources I can learn from.

reddit.com
u/adupoku1423 — 4 days ago
▲ 18 r/django

Django with Inertia

Hello all

I'm looking to see if anyone has used/uses Django with Inertia and wouldn't mind giving me honest feedback about it. I have used Laravel with Inertia quite a bit but given the amount of Python I use, I wondered about using Django with it for an upcoming web project I have and if it gives anything extra over HTMX or even a SPA frontend (for context, the project is a simple brochure/ecommerce site but with a separate app for staff to log inventory).

Many thanks in advance!

reddit.com
u/MichaelW_Dev — 5 days ago
▲ 26 r/django

Our new product strategy for Wagtail

Revisiting the fundamentals of open source x Python x Django, + accessibility, sustainability, security. With a clear take on AI adoption that’s not just "AI first with ✨ sparkle buttons". Have a read, tell us what you think!

wagtail.org
u/thibaudcolas — 6 days ago
▲ 7 r/django

Django Htmx Question

I am using django and htmx to build simple e ecommerce site. From someone who had practice some basics of React and Next.js while long time back then.

The way they(react/next.js)route the pages move from one page to another and layouts it seemed so easy because it use json unlike in my case I am using django templating.

When you are moving page to page, routing and rendering templates fragments with django htmx that means html layout is going to change, you have worry about full page refresh, css, and moving from one page to another etc.

My question how do you build layouts like in React to efficiently maintain SPA in htmx.

I have tried to find tutorials and tutorial I find they are only focused on small parts of the websites not on the big picture where everything is connected.

reddit.com
u/ApprehensiveShift201 — 7 days ago
▲ 5 r/django

How should I authenticate Auth0 users in a Django REST Framework API called by an MCP server?

Hi everyone,

I’m building a Django REST Framework API and I need help understanding the correct way to authenticate users and return only their own data.

My setup is:

  • Auth0 for authentication
  • Django REST Framework as the backend API
  • An MCP server that will call the Django API
  • The MCP server will send requests to Django with a bearer token, like:

​

Authorization: Bearer <token>

What I want is:

  • The Django API should verify that the token is valid
  • The API should know which user the token belongs to
  • The API should only return data belonging to that user

For example, if I have a Note model with an owner, I want something like this to be safe:

Note.objects.filter(owner=request.user)

But I’m not sure how to correctly set this up.

My questions are:

  1. How should Django REST Framework validate the Auth0 token?
  2. Should I write a custom authentication class for this?
  3. How does Django turn the token into request.user?
  4. Should I create local Django users based on the Auth0 user ID?
  5. How should the MCP server get and pass the token to Django?
  6. What is the right OAuth/Auth0 flow if the data belongs to individual users?
  7. What is the safest standard way to make sure each user can only access their own data?

I understand basic Django and Python, but I’m new to authentication, JWTs, Auth0, and OAuth, so I’d really appreciate a step-by-step explanation or recommended pattern or resource to learn this.

Thanks.

reddit.com
u/Brinner17 — 7 days ago
▲ 13 r/django+1 crossposts

Open-sourced our production Django HRMS — Docker-ready, MIT license

We (Sevendyne, small engineering team in India) built an HRMS over the past year and open-sourced it under MIT.

Stack: Django 5, PostgreSQL, Redis, Celery, Docker Compose

Modules: auth/roles, attendance, payroll, leave, recruitment

git clone https://github.com/sevendyne/sevendyne_hrms.git

docker compose up --build

Demo logins seeded automatically (admin/admin, etc.). We labeled good-first-issues for contributors.

Repo: https://github.com/sevendyne/sevendyne_hrms

Happy to answer architecture questions. Not selling anything — genuinely open source.

reddit.com
u/ansifpi — 8 days ago
▲ 7 r/django

UniqueConstraints

Is there a short hand for creating UniqueConstraints to all fields in a model?

Update: A couple of people have asked why I'm trying to do this. I'm creating a website for people to use to teach a card game to people. In doing so, I want them to be able to create a room where the hands can have certain features that can be saved. There are about 10 features that they can have for each hand and they may have more the one set since there are four hands. For example, the person in first position may have 5 hearts, 1 club and 3 spades. The person in second position may have 5 spades and 4 clubs.

My plan is to have a manytomany that links to hand features. Because many of these hand features could potentially be reused multiple times I'd prefer not to have duplicates. My model is below. If the way I'm planning on doing this is wrong I'm definitely open to constructive suggestions.

class RoomModel(models.Model):
    room_name = models.CharField(default='No Room Name', unique=True)
    hand_features = models.ManyToManyField(HandFeatures, related_name='room_hand_features')


class HandFeatures(models.Model):
    applies_North=models.BooleanField(default=False)
    applies_South=models.BooleanField(default=False)
    applies_East=models.BooleanField(default=False)
    applies_West=models.BooleanField(default=False)
    alternate=models.BooleanField(default=False)
    min_HCP=models.IntegerField(default=0)
    max_HCP=models.IntegerField(default=40)
    partner_min_HCP=models.IntegerField(default=0)
    partner_max_HCP=models.IntegerField(default=40)    
    five_card_major=models.BooleanField(default=False)
    partner_with_support=models.BooleanField(default=False)
reddit.com
u/Prize_Shine3415 — 10 days ago
▲ 1 r/django+1 crossposts

Please help. From . import views not working

Hi. I hope you are having a great day so far. I am a django beginner and I was trying to learn django using the official tutorial and the youtube course by BugBytes. The problem is, I keep on getting stuck on the first page of the tutorial. I have tried 3 times with 3 different folders and nothing seems to work. Could you please help me out?

Here's the code:

Note: The file is urls.py inside the app, just like the tutorial specified. In fact, this is just copy pasted from the tutorial.from django.urls import path


from . import views


urlpatterns = [
    path("", views.index, name="index"),
]

I keep on getting the following error:

from . import views

ImportError: attempted relative import with no known parent package

Here's a screenshot of my folder structure.

My main folder is named Django, please do not confuse it with something else

What do I do? I have tried replacing . with the main file name (polls). It hasn't worked either. I also made sure to download Django v6.0. Still didn't work. I would appreciate any advice on how to solve this. Thank you for your time. Have a nice day!

--------------------------------------------------------------------

Here's some extra info just in case:

from django.shortcuts import render


from django.http import HttpResponse



def
 index(request):
    return HttpResponse("Hello, world. You're at the polls index.")

Note: This file is in the views.py file inside the app. It has also been copy pasted from the website. No errors are being flagged in it.

The page for the tutorial is this one: https://docs.djangoproject.com/en/6.0/intro/tutorial01/#write-your-first-view

If you scroll down to the section 'Write your first view', you shall find the exact code that I have used.

reddit.com
u/Ok_Equivalent1870 — 11 days ago
▲ 0 r/django

which to choose for creating drf views?

im confused which one to learn from following for django drf views:

View Type Class Best For Industry Usage
Function-Based Views api_view Small APIs, beginners ⭐⭐☆☆☆
APIView APIView Custom logic ⭐⭐⭐⭐☆
GenericAPIView + Mixins GenericAPIView + Mixins CRUD with customization ⭐⭐⭐⭐☆
Generic Class-Based Views ListCreateAPIView, RetrieveUpdateDestroyAPIView, etc. Standard CRUD ⭐⭐⭐⭐⭐
ViewSets + Router ModelViewSet, ReadOnlyModelViewSet RESTful APIs ⭐⭐⭐⭐⭐

above response is given by chatgpt but i need opinion of experienced developers

reddit.com
u/Puzzled_Cod_9192 — 11 days ago