Open Sanshain opened 4 years ago
I'm stuck too. even just importing hamlpy I get this error
File "/Users/xx/.pyenv/versions/2.7.18/lib/python2.7/importlib/__init__.py", line 37, in import_module
__import__(name)
File "/Users/xx/.pyenv/versions/2.7.18/lib/python2.7/site-packages/hamlpy/__init__.py", line 2, in <module>
import templatize
File "/Users/xx/.pyenv/versions/2.7.18/lib/python2.7/site-packages/hamlpy/templatize.py", line 18, in <module>
trans_real.templatize = decorate_templatize(trans_real.templatize)
AttributeError: 'module' object has no attribute 'templatize'
I did the same Python 2.7.18 Django 1.11 pip install hamlpy
what I'm wrong?
what I'm wrong?
This is my old question 4 years ago, to which I have not found an answer. The original repository has not been supported for 10 years. Then I found and made my fork, which worked for me. You can try it out.
I also just looked that there is also activity in the repository from which I made the fork.
I tried to start hamlpy by django 1.11 python 2.7.16. The package was installed 'pip install hamlpy' and followed instructions for setting.
Settings of project:
my view:
haml = lambda request: render(request,"test.haml",{})
my test.haml:
the result page output is one line:
It meens, template has displayed as usually django-template.
I tried to understand why and visit to loaders.py. I discovered for myself that
load_template_source
is never be called by renderingtest.haml
and be rendered by integrated in django standart loaders.I cann't find the answers why