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

Use django.utils.module_loading.import_string in generic.helpers.class_from_path #697

Closed
b1rger opened this issue Mar 4, 2024 · 0 comments · Fixed by #718 or #726
Closed

Use django.utils.module_loading.import_string in generic.helpers.class_from_path #697

b1rger opened this issue Mar 4, 2024 · 0 comments · Fixed by #718 or #726
Assignees

Comments

@b1rger
Copy link
Contributor

b1rger commented Mar 4, 2024

import_string might make the code a bit more readable

@b1rger b1rger self-assigned this Mar 4, 2024
b1rger added a commit that referenced this issue Mar 14, 2024
This gives us a bit more flexibility regarding the searched dotted
paths.

Closes: #697
b1rger added a commit that referenced this issue Mar 14, 2024
This gives us a bit more flexibility regarding the searched dotted
paths.

Closes: #697
b1rger added a commit that referenced this issue Mar 14, 2024
This gives us a bit more flexibility regarding the searched dotted
paths.

Closes: #697
b1rger added a commit that referenced this issue Mar 15, 2024
This gives us a bit more flexibility regarding the searched dotted
paths.

Closes: #697
b1rger added a commit that referenced this issue Mar 18, 2024
Django already comes with a util method to load a Python module member
from a string - `django.utils.module_loading.import_string`. Using this
instead of our own implementation in
`generic.utils.helper.class_from_path` we can refactor the lookup logic
and provide a more flexible way of looking up Python members.

Closes: #697
b1rger added a commit that referenced this issue Mar 18, 2024
Django already comes with a util method to load a Python module member
from a string - `django.utils.module_loading.import_string`. Using this
instead of our own implementation in
`generic.utils.helper.class_from_path` we can refactor the lookup logic
and provide a more flexible way of looking up Python members.

Closes: #697
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant