How can I manipulate the link in an Admin URLField so it uses the normal
HTML hyperlink attributes?
I have a substance with ingredients in a self m2m relationship and I
want the ingredients displayed to carry a link to open themself in
another substance page.
IOW, I want to use the
substance.name (ie, ingredient name) instead of
substance.id in the URL.
Also, I don't need the user to see the input ("Change") part of the
field because that is always done by the software.
I guess the answer is to sub-class the AdminURLFieldWidget and use that
via ...
formfield_overrides = {
URLField: {'widget': myAdminURLFieldWidget},
}
However, I'm a bit lost in making it happen. Where do I learn more?
Thanks
Mike