def get_render_template(self, context, instance, placeholder): if context.get('amp', False): return "my_app/plugins/my_plugin_amp.html" else: return "my_app/plugins/my_plugin.html"