Skip to content
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

5.0: Update django.forms.boundfield and django.forms.utils #2118

Merged
merged 10 commits into from
May 3, 2024

Conversation

JaeHyuckSa
Copy link
Contributor

@JaeHyuckSa JaeHyuckSa commented May 3, 2024

I have made things!

Update stubs for django.forms.boundfield for Django 5.0.

  • django.forms.boundfield
    • django.forms.boundfield.BoundField was changed
    • django.forms.boundfield.BoundField.renderer was added
    • django.forms.boundfield.BoundField.get_context was added
    • django.forms.boundfield.BoundField.template_name was added
  • django.forms.utils
    • django.forms.utils.RenderableFieldMixin was added

Related issues

Refs

Upstream PR

@sudosubin
Copy link
Contributor

sudosubin commented May 3, 2024

It would be nice to modify the BoundField class to inherit from the RenderableFieldMixin (and properties like renderer, template_name, get_context should probably be placed in the RenderableFieldMixin).

@sudosubin sudosubin mentioned this pull request May 3, 2024
39 tasks
@JaeHyuckSa
Copy link
Contributor Author

JaeHyuckSa commented May 3, 2024

It would be nice to modify the BoundField class to inherit from the RenderableFieldMixin (and properties like renderer, template_name, get_context should probably be placed in the RenderableFieldMixin).

I apologize for any inconvenience my question may have caused. @sudosubin I'm still not good enough. Sot I'm wondering why you need properties like renderer, template_name, get_context when you inherit. I'd appreciate it if you could tell me :)

@sobolevn
Copy link
Member

sobolevn commented May 3, 2024

Hey, @saJaeHyukc! I just wanted to say that you are doing a great work 🚀
I am super happy that you contribute to our project. Please, don't be sorry for anything, you are doing great.

@JaeHyuckSa JaeHyuckSa changed the title 5.0: Update django.forms.boundfield 5.0: Update django.forms.boundfield and django.forms.utils May 3, 2024
@JaeHyuckSa
Copy link
Contributor Author

JaeHyuckSa commented May 3, 2024

Hey, @saJaeHyukc! I just wanted to say that you are doing a great work 🚀 I am super happy that you contribute to our project. Please, don't be sorry for anything, you are doing great.

Thank you for giving me courage :) I'm always careful because I don't think my time and other people's time are the same.

I will proceed with the courage when I work on it from now on :)

django-stubs/forms/boundfield.pyi Outdated Show resolved Hide resolved
django-stubs/forms/utils.pyi Show resolved Hide resolved
django-stubs/forms/utils.pyi Outdated Show resolved Hide resolved
@sobolevn
Copy link
Member

sobolevn commented May 3, 2024

I will proceed with the courage when I work on it from now on

Feel free to ping me on any issue / ask any questions / drop me a line.
I will always find some time to answer :)

@sudosubin
Copy link
Contributor

It would be nice to modify the BoundField class to inherit from the RenderableFieldMixin (and properties like renderer, template_name, get_context should probably be placed in the RenderableFieldMixin).

I apologize for any inconvenience my question may have caused. @sudosubin I'm still not good enough. Sot I'm wondering why you need properties like renderer, template_name, get_context when you inherit. I'd appreciate it if you could tell me :)

Oh, I meant RenderableMixin. In the RenderableMixin's render method implementation, it is accessing properties like renderer, template_name, get_context, etc. (but not sure it is a right place to add type hints.)

@JaeHyuckSa
Copy link
Contributor Author

I will proceed with the courage when I work on it from now on

Feel free to ping me on any issue / ask any questions / drop me a line. I will always find some time to answer :)

Thank you :)

@JaeHyuckSa
Copy link
Contributor Author

It would be nice to modify the BoundField class to inherit from the RenderableFieldMixin (and properties like renderer, template_name, get_context should probably be placed in the RenderableFieldMixin).

I apologize for any inconvenience my question may have caused. @sudosubin I'm still not good enough. Sot I'm wondering why you need properties like renderer, template_name, get_context when you inherit. I'd appreciate it if you could tell me :)

Oh, I meant RenderableMixin. In the RenderableMixin's render method implementation, it is accessing properties like renderer, template_name, get_context, etc. (but not sure it is a right place to add type hints.)

Thank you for the explanation :) I will add the code if the reviewer needs to add the code you mentioned.

@sobolevn sobolevn merged commit 856e8c2 into typeddjango:master May 3, 2024
40 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants