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

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

Error:
‘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’

Advertisements
Categories: Django Tags: ,
  1. No comments yet.
  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: