Closed calebj closed 8 years ago
sorry, I don't get the point here. I do not even want to show those includes. Doesn't this work in your environment, or what's the problem. This demo holds the code for this application: http://django-angular.awesto.com/form_validation/ Is there any problem I have overseen?
Without disabling autoescape, no, it doesn't work in my environment. Without it, the HTML generated by pygment is displayed instead of the formatted code. This ends up breaking Angular for the entire page. The code section of the server response is:
<div ng-show="activeTab==='Form'"><div class="highlight"><pre><span class="kn">from</span> <span class="nn">djangular.forms</span> <span class="kn">import</span> <span class="n">NgFormValidationMixin</span>
... </div>
... and so on instead of HTML.
For some reason, HTML returned by function calls isn't escaped on your server. But with no other changes from the git pull, the examples don't work on my system. I'm running django 1.9.1
Thanks for reporting and patching. This regression must have been introduced after df4686ff02c68422e93cf87d64f476b250842545 which was the last version published on the demo site. I now upgraded to your last version and now everything works again.
Django autoescapes all function calls in templates by default. To get the pygment call to display properly, this needs to be turned off.
Also, there is no Angular 1.3.30 yet.