Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/sapphire64/vortexforms
Template engine to convert jinja-like templates into HTML with input forms. Forms can be replaced or extended with user's input dictionary.
https://github.com/sapphire64/vortexforms
Last synced: about 20 hours ago
JSON representation
Template engine to convert jinja-like templates into HTML with input forms. Forms can be replaced or extended with user's input dictionary.
- Host: GitHub
- URL: https://github.com/sapphire64/vortexforms
- Owner: Sapphire64
- Created: 2012-12-19T04:14:13.000Z (about 12 years ago)
- Default Branch: master
- Last Pushed: 2012-12-25T14:00:01.000Z (almost 12 years ago)
- Last Synced: 2024-11-06T00:42:17.931Z (about 2 months ago)
- Language: Python
- Homepage:
- Size: 125 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.rst
Awesome Lists containing this project
README
VortexForms
==================Simple template engine to convert HTML templates with service tags into HTML with input forms.
Implemented with Jinja2 in mind :)
Create forms from templates
--------------Write template like this one:
.. code::
Your name: {{ first_name|text|class=myclass }}
Implementation:
.. code::
>>> VortexProcessor(code="
Your name: {{ first_name|text|class=myclass }}
").render()Result:
.. code::
Your name:
Replace forms with user input
--------------Use template as usual:
.. code::
Your name: {{ first_name|text|class=myclass }}
Pass dictionary with values to processor:
.. code::
>>> values = {'first_name':'Vortex'}
>>> VortexProcessor(code="Your name: {{ first_name|text|class=myclass }}
").render(values)Result:
.. code::
Your name: Vortex
TODO
--------------
1) Convert into module
2) Add functional and unit testings
3) Add more comments