Combining Django Templates and Polymer -


i've been stuck past few hours trying figure out why core polymer elements not being displayed in django application i'm making act personal webpage. application @ moment points index.html page which, if follow tutorial on polymer, step one.

however, components not loading on page. static files set correctly, , there's subtle animation css files being loaded correctly, roboto font , core-elements not being displayed. running site normal html file correctly.

is there specific way user polymer in django template?

thanks.

see eric's answer on polymer-dev mailing list: https://groups.google.com/forum/?fromgroups=#!searchin/polymer-dev/django/polymer-dev/n2r8qknaloi/58zhc1gwfh4j

relevant excerpt:

django 1.5 has support verbatim tag. can wrap inlined element definitions in that: https://docs.djangoproject.com/en/1.5/ref/templates/builtins/#verbatim

example code snippet:

{% verbatim %} <template repeat="{{item items}}">   <my-element name="{{item.name}}"></my-element> </template> {% endverbatim %}  <script>   document.queryselector("template').model = {{items}}; // items here filled server's template. </script> 

Comments

Popular posts from this blog

javascript - RequestAnimationFrame not working when exiting fullscreen switching space on Safari -

Python ctypes access violation with const pointer arguments -