Posts Tagged ‘scaffolding’

Solving quotes issue in Templates while after using django-generate-scffolding

August 6, 2014 Leave a comment

‘url’ requires a non-empty first argument. The syntax changed in Django 1.5, see the docs.
Solution 1:

sed -i -r ‘s/url ([^”]+) %/url “\1” %/g’ template.html

solution 2: Run this one from templates folder.

find . -type f -print0 | xargs -0 sed -i ‘s/{% url \([^” >][^ >]*\)/{% url “\1″/g’

Categories: Django Tags: ,
%d bloggers like this: