Error importing template source loader pyjade.ext.django.Loader

1.1k Views Asked by At

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?

1

There are 1 best solutions below

0
On

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.