angularjs - Django-Angular's djng_rmi template tags do not expand -


i'm trying use django-angular's djangormiprovider give angular app sits on top of django access django methods.

the snippet i've copied in (and customised my_app name), , added console.log is:

{­% load djangular_tags %­} … <script type="text/javascript"> console.log("djangormiprovider: "+djangormiprovider); my_app.config(function(djangormiprovider) {     djangormiprovider         .configure(             {­% djng_current_rmi %­} <!--errors here -->          ); }); </script> 

it turns out neither {­% djng_current_rmi %­} nor {­% djng_all_rmi %­} expand out should.

i've gone far copying django-angular file djangular_tags.py under:

my_app      ↳ templatetags          ↳ djangular_tags.py 

and i'm both my_app , django_angular (i had rename django-angular app djangular django_angular there package, djangular, app name djangular - try saying ten time fast) in 'installed_apps'.

i used this dirty hack force tags builtins either i've done wrong, or doesn't work (i errors saying it's looking in django.templatetags.my_app.templatetags.djangular_tags, not right, or other erros, if put my_app.templatetags.djangular_tags in function call)

the {} function declaration confuse django when looks tags inject. moving outside of function declaration, should work fine.

{% load djangular_tags %} … <script type="text/javascript">     var tags = {% djng_current_rmi %}      my_app.config(function(djangormiprovider) {         djangormiprovider             .configure(                  tags              );     }); </script> 

Comments

Popular posts from this blog

android - MPAndroidChart - How to add Annotations or images to the chart -

javascript - Add class to another page attribute using URL id - Jquery -

firefox - Where is 'webgl.osmesalib' parameter? -