On 2 Sty, 16:12, Rajesh Dhawan <rajesh.dha...@gmail.com> wrote: > Here's another way to solve this: Add a rendered_version field to your > Message model and populate it at the time that the message is saved > (perhaps by overriding the Message.save method). This way, you would > just need to write {{ message.rendered_version|safe }} in your > dashboard's template loop and anywhere else you want to render that > message.
Thanks - this method seems more reasonable than the concept of cached templates. > One drawback of this method is that if you want old messages to be > rendered with updated templates, it's not straightforward. Hopefully, > your use cases don't call for that. For debug purposes I added template inclusion so that I can make quick changes without rebuilding messages every time. In production environment it will be necessary to rebuild them after template code has changed, but codebase updates aren't a thing you do fifty times at a day. Michael --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~----------~----~----~----~------~----~------~--~---