HamlPy
HamlPy copied to clipboard
A converter of HAML like templates into Django templates.
Hello, I'm trying to use the framework "bootstrap-vue" in an existing project which uses hamlpy. To use tabs i need to generate the following html : ``` Tab 1 Tab...
I tried to start hamlpy by django 1.11 python 2.7.16. The package was installed 'pip install hamlpy' and followed [instructions ](https://github.com/jessemiller/HamlPy) for setting. Settings of project: ``` INSTALLED_APPS = [...
See https://github.com/a1s/HamlPy/blob/master/reference.md#conditional-attributes This should close #38 and #111.
You often need to set boolean attributes (checked, selected,disabled) conditionally in a template in Haml you can do something like: ``` %input{:selected => false} ``` which will evaluate to: ```...
Conditional boolean attributes were requested by a few people (See #111), but no one has actually made any effort in solving this issue. When I started working on supporting conditional...
I have noticed that markdown didn't use any code highlighting and decided to add some.
Example: ``` - with some_context ... - with some_other_context ... ``` Gets compiled to: ``` {% with some_context %} ... {% with some_other_context %} ... {% endwith %} {% endwith...
Example: `%input{type: "text", value: "={f.value|default:""}"}` The double quotes for `default` are removed, which renders to `value='{{ f.value|default: }}'` and raises an exception because it's missing a parameter. Using single quotes...
To support Django 1.9, I have added the get_contents functions to the template loader. Also, I needed Mock for some assertions. Therefore I chose to use setup.py to define the...