JinjaLive: Jinja rendering made easy
Project description
Welcome to JinjaLive documentation!
JinjaLive is a project created by Marlysys.
JinjaLive can be used to test your Jinja templates. It renders a Jinja template with given variables to a rendered output. As simple as that !
Installation
JinjaLive is available on pip:
pip install jinjalive
Usage
Command-line usage
Given a context file and a template file, JinjaLive will generate the output file:
jinjalive -cf <context_file> -tf <template_file> -of <output_file>
Web application
Launch the JinjaLive server with:
jinjalive-server
Open your browser to http://<your_ip_address>:8888
Tests
JinjaLive embeds unittests to ensure both functionnalities coverage but also Python code quality.
The test suite can be launched with tox:
cd jinjalive
sudo pip install -r test-requirements.txt
tox
Apache configuration (optional)
If you want to serve the JinjaLive web application behind Apache, please use WSGI.
sudo apt-get update
sudo apt-get install apache2 libapache2-mod-wsgi
sudo a2enmod wsgi
Here is a sample Apache virtualhost:
<VirtualHost *:80>
WSGIDaemonProcess jinjalive threads=5
WSGIScriptAlias /jinja /usr/local/lib/python2.7/dist-packages/jinjalive/jinjalive.wsgi
<Directory /usr/local/lib/python2.7/dist-packages/jinjalive>
WSGIProcessGroup jinjalive
WSGIApplicationGroup %{GLOBAL}
WSGIScriptReloading On
Require all granted
</Directory>
ErrorLog ${APACHE_LOG_DIR}/jinjalive.error.log
CustomLog ${APACHE_LOG_DIR}/jinjalive.access.log combined
</VirtualHost>
Your JinjaLive web application is now available under http://<your_ip_address>/jinja.
Contributing
Requirements
JinjaLive needs the following requirements:
Nowadays, python should ever be present on your system, but bower usually requires proper installation.
bower requires nodejs. Here is the full procedure to install bower for Ubuntu:
sudo apt-get update
sudo apt-get install nodejs npm
sudo npm install -g bower
sudo ln -s /usr/bin/nodejs /usr/bin/node
Go to project directory:
cd jinjalive
Install bower requirements:
bower install
Install Python requirements and JinjaLive package with a virtualenv:
mkvirtualenv jinjalive
pip install -r requirements.txt
python setup.py develop
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file jinjalive-0.2.0.tar.gz.
File metadata
- Download URL: jinjalive-0.2.0.tar.gz
- Upload date:
- Size: 3.4 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
11a68c40906e68fbd3afd30dba14ccf8ca13c7ac48610dac1f5da8927844f700
|
|
| MD5 |
395b6ec0cee889b334b9a219ae7303d6
|
|
| BLAKE2b-256 |
113245892b9ce10a0b6f79f99038c9238bf81b9d23469da061aad23f4beb1f19
|
File details
Details for the file jinjalive-0.2.0-py2.py3-none-any.whl.
File metadata
- Download URL: jinjalive-0.2.0-py2.py3-none-any.whl
- Upload date:
- Size: 3.3 MB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0c11980a4dd916d0ab04a9114c66102d68566ad7bfa31a6ed0b7f108a51f184d
|
|
| MD5 |
642c3ec8e67f9b78a09e2223b138abe6
|
|
| BLAKE2b-256 |
03b785864dddddb16c42319c8e5fa0e25838dccf8593b02a222e944370dffe4b
|