1

Jade is a great template.I wanna use it in Django and I found Pyjade.

I follow the example code but I got error when I run the project.

In Django Debug Mode , Django told me :

ImproperlyConfigured at /
Error importing template source loader pyjade.ext.django.Loader: "cannot import name force_text"

When I try to use

pyjade index.jade 

I can get the correct result but with 3 warning:

WARNING:root:cannot import name force_text
WARNING:root:No module named jinja2.ext
WARNING:root:No module named tornado.template

Here is my setting.py

...

TEMPLATE_LOADERS = (
    ('pyjade.ext.django.Loader',(
        'django.template.loaders.filesystem.Loader',
        'django.template.loaders.app_directories.Loader',
    )),
)

...

I use pip to install pyjade on my Django==1.4

Does anybody meet this problem and how to solve it?

CashLee李秉骏
  • 1,038
  • 1
  • 10
  • 23
  • Where is your django installed in?I think you run django at 1.1 or lower version indeed, take a look at the discuss https://groups.google.com/d/topic/django-users/CEvCz-IwLQc/discussion – iMom0 Mar 03 '13 at 11:37
  • nope ... I am using Django==1.4.:-( – CashLee李秉骏 Mar 03 '13 at 17:54

1 Answers1

0

Follow this link and u would solve the problem.Maybe u can install the lastest version of pyjade to solve this problem.

The author helped me and close this issue : https://github.com/SyrusAkbary/pyjade/issues/85

Have fun.

CashLee李秉骏
  • 1,038
  • 1
  • 10
  • 23