3👍
You’re passing the wrong thing into get_for_object
– you need to pass the instance, function
, not the model, Function
.
1👍
Drop the parens and the Django template engine will do the calling for you:
{% for field_name, field_value in version.field_dict.items %}
This works for methods that take zero arguments.
- [Django]-Postfix + Django: SMTPException: SMTP AUTH extension not supported by server
- [Django]-How to make a filter in Django Listview queryset
Source:stackexchange.com