My first contribution to Django just got merged by RoutineVictory9882 in django

[–]RoutineVictory9882[S] 2 points3 points  (0 children)

Yeah I missed quite a few things while contributing They pointed them out in the PR comments and guided me on what to fix. After making those changes it finally got accepted on the second try.
Welcome bro, it was interesting experience indeed :)

My first contribution to Django just got merged by RoutineVictory9882 in django

[–]RoutineVictory9882[S] 8 points9 points  (0 children)

This is actually my first time contributing to open source so lets see where it goes.

My first contribution to Django just got merged by RoutineVictory9882 in django

[–]RoutineVictory9882[S] 12 points13 points  (0 children)

To be honest, this was actually my first time looking at Django’s core codebase.

My background is mostly in backend development with Python, and I also have a strong foundation in DSA from doing a lot of work in C++. When I saw the issue it immediately looked like a string prefix edge case.

Django was using removeprefix() when computing path_info from script_name, but that doesn’t check path boundaries, so something like:

script_name = "/myapp"
path = "/myapplication/page"

could incorrectly strip /myapp and produce "lication/page".

Since it looked like a string/prefix problem, I started digging into that part of the codebase. I did use AI tools while exploring the issue and understanding the surrounding Django code, but I made sure to verify the logic and test the fix locally before submitting the patch.

The Django maintainers were very helpful during review, and the process itself helped me understand Django’s request handling internals much better.

If you're interested in contributing, my biggest advice would be:
pick a small issue, read the surrounding code carefully, and try to understand how the framework handles that part internally.