I'm currently writing a Django template template tag, and I would like to be able to reference a class in it with a string, just like in settings.MIDDLEWARE_CLASSES
, for example. The tag would look like {% mytag "myproject.lib.mymodule.SomeClass" %}
.
The question is fairly simple : in my template tag, how may I easily resolve this string to the actual referenced class?
Thanks.