Mako templates using Django template tags

后端 未结 1 1935
悲&欢浪女
悲&欢浪女 2020-12-18 05:59

Our Django site is built using Mako templates. We want to use a third party project called django-socialregistration, but its template tags use Django\'s templates. If we us

相关标签:
1条回答
  • 2020-12-18 06:35

    I've hardly used Mako, but if you can include arbitrary Python code, you could always inline the template rendering function there.

    <%
        tpl = """{% load facebook_tags %}{% facebook_button %}{% facebook_js %}"""
        from django.template import Template, Context
        t = Template(tpl)
        t.render(Context())
    %>
    
    0 讨论(0)
提交回复
热议问题