We can get django objects fields using string by “getattr”. For instance, I have profile objects.
1 | getattr(profile, "name") |
Easy! 😀
We can get django objects fields using string by “getattr”. For instance, I have profile objects.
1 | getattr(profile, "name") |
Easy! 😀