0
I Use This!
Inactive
Analyzed about 17 hours ago. based on code collected about 17 hours ago.

Project Summary

ErlyDTL is an Erlang implementation of the Django Template Language. The erlydtl module compiles Django Template source code into Erlang bytecode. The compiled template has a "render" function that takes a list of variables and returns a fully rendered document.

The project is stable and mostly complete. Most but not all Django tags and filters have been implemented. See TagsAndFilters for a list of supported features.

Project mailing list: http://groups.google.com/group/erlydtl/

Basic example illustrating the syntax:An ErlyDTL template is a text file (e.g.: a HTML or CSS file) containing variables to control the runtime template content, tags to control the runtime template logic and comments, which get filtered out.

Template file welcome.html:

Welcome back, {{ name }}!

You have {{ friends|length }} friends: {{ friends|join:", " }}

Have some primes:
{# this is exciting #}
{% for i in primes %}
{{ i }}
{% endfor %}Erlang code:

erlydtl:compile("/path/to/welcome.html", welcome_template),
welcome_template:render([
{name, "Johnny"},
{friends, [<>, <>]},
{primes, [1, 2, "3", <>]}
]).Result:

Welcome back, Johnny!

You have 2 friends: Frankie Lee, Judas Priest

Have some primes:
1
2
3
5ErlyDTL referenceSee the Overview for complete usage.

Tags and FiltersSee TagsAndFilters for a list of the Django tags that ErlyDTL supports.

Other featuresVariables can optionally be pre-set at template compilation, which is useful for stuff which doesn't change often. These variables get pre-rendered as much as possible at compilation time for maximum performance.

Optional recompilation: skip if compiled template exists already and template source checksum has not changed.

Templates accept variables as property list, dict, gb_tree or parameterized modules and the actual values can be numbers or strings (lists or binaries)

Variables, Tags and Comments can be wrapped with HTML comments () for a possibly better integration with certain HTML editors / browser previews

Templates need not live on the local file system; you can write your own "reader" function, e.g. to read templates from network storage such as Amazon S3.

Requirements:Erlang R12B-2 ToDo:implement all tags and filters defined in original Django allow funs as compile / render options for: variables output writer callback source reading function

Tags

django erlang templates

In a Nutshell, erlydtl...

MIT License
Permitted

Commercial Use

Modify

Distribute

Sub-License

Private Use

Forbidden

Hold Liable

Required

Include Copyright

Include License

These details are provided for information only. No information here is legal advice and should not be used as such.

Project Security

Vulnerabilities per Version ( last 10 releases )

There are no reported vulnerabilities

Project Vulnerability Report

Security Confidence Index

Poor security track-record
Favorable security track-record

Vulnerability Exposure Index

Many reported vulnerabilities
Few reported vulnerabilities

Did You Know...

  • ...
    in 2016, 47% of companies did not have formal process in place to track OS code
  • ...
    anyone with an Open Hub account can update a project's tags
  • ...
    65% of companies leverage OSS to speed application development in 2016
  • ...
    data presented on the Open Hub is available through our API
About Project Security

Languages

Languages?height=75&width=75
Erlang
99%
2 Other
1%

30 Day Summary

Sep 24 2021 — Oct 24 2021

12 Month Summary

Oct 24 2020 — Oct 24 2021

Ratings

Be the first to rate this project
Click to add your rating
   Spinner
Review this Project!