Re: [WARNING - NOT Solved] SVG widget for the Admin

2021-07-25 Thread Mike Dewhirst
On 9/06/2021 12:44 pm, Mike Dewhirst wrote: Do not use this solution. The Svg_AdminTextareaWidget code below deletes data on saving. I think the reason might be that on saving it tries to save the image instead of the image source code. I'm now digging deeper and will report back. I can't

[WARNING - NOT Solved] SVG widget for the Admin

2021-06-08 Thread Mike Dewhirst
Do not use this solution. The Svg_AdminTextareaWidget code below deletes data on saving. I think the reason might be that on saving it tries to save the image instead of the image source code. I'm now digging deeper and will report back. Mike On 7/06/2021 6:00 pm, Mike Dewhirst wrote: Than

Re: [Solved] SVG widget for the Admin

2021-06-07 Thread Derek
Good to hear! Django once again proving capable, once you figure it out. Am reminded of the Zen: "There should be one-- and preferably only one --obvious way to do it. Although that way may not be obvious at first unless you're Dutch." On Mon, 7 Jun 2021 at 10:00, Mike Dewhirst wrote: > Than

[Solved] SVG widget for the Admin

2021-06-07 Thread Mike Dewhirst
Thanks Derek - it is now working as follows ...  class Chemical(models.Model):     ...     ddstructure = models.TextField(null=True, blank=True, verbose_name="2D structure")     ... class Svg_AdminTextareaWidget(AdminTextareaWidget):     def render(self, name, value, attrs=None, renderer=Non