Skip to content

Add types to parts of Django #23

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
1 task done
smark-1 opened this issue May 4, 2025 · 2 comments
Open
1 task done

Add types to parts of Django #23

smark-1 opened this issue May 4, 2025 · 2 comments

Comments

@smark-1
Copy link

smark-1 commented May 4, 2025

Code of Conduct

  • I agree to follow Django's Code of Conduct

Feature Description

I would like types and/or type hints to be added or allowed to be added to Django.

Problem

Right now when using Django it is not uncommon to need to look at the docs just to see what a function returns or what the arguments type is. While this has been proposed a few times now, the Python typing ecosystem has improved making this more viable. While there are some areas where this would be difficult and may even hurt the experience due to Django's complexity like the ORM. I feel that there are some parts like the request, response object, path, class-based views, etc that would greatly benefit from this.

Request or proposal

proposal

Additional Details

This has been discussed before, most recently https://forum.djangoproject.com/t/revisiting-types-in-django-dep-14/37832.
I thought I would add it here as well.

This would also help solve many of the issues here https://groups.google.com/g/django-developers/c/at-G0hZrfXE.

Implementation Suggestions

No response

Copy link

github-actions bot commented May 4, 2025

Thank you smark-1 for sharing your idea! We have a lot of them so please be patient. You can see the current queue here.

Community instructions

For commenters, please use the emoji reactions on the issue to express support, and/or concern easily. Please use the comments to ask questions or contribute knowledge about the idea. It is unhelpful to post comments of "I'd love this" or "What's the state of this?"

Reaction Guide

  • 👍 This is something I would use
  • 👎 This is something that would cause problems for me or Django
  • 😕 I’m indifferent to this
  • 🎉 This is an easy win

@jacobtylerwalls
Copy link
Member

We could split off the proposal to add Protocols for Resolvable and Compilable in the ORM as an "easy win" proposal ("🎉 ") since it's basically done.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Idea
Development

No branches or pull requests

2 participants