Open nerdoc opened 1 year ago
You wouldn't replace value
with **kwargs
, but you could add *args, **kwargs
to the signature.
The base render()
needs to return value
, so you need to make sure it gets an arg for value
.
There's a good explanation of this here.
definitely, I'll change this above. Thanks for the hint.
https://github.com/jieter/django-tables2/blob/7a5a1fbf2bb5ce2ebe48e962b00c8ff327fea644/django_tables2/columns/base.py#L356
This method is called and can be declared with various parameters (dynamically determined by introspection) in subclasses.
IDEs like PyCharm help by finding out which params the inherited method has, to show you an error if the signature doesn't match.
So if you e.g. declare a Column like this:
the IDE places a warning:
By adding
*args, **kwargs
aftervalue
this problem can be solved, and does not impact other things IMHO.However, I don't know much of the internals of django_tables2, so please feel free to close this issue if you think this is not helpful or affects other subsystems...