Closed Justyn-Nissly closed 7 months ago
While learning how to use OteraEngine with Oxygen.jl I got an error when trying to render a template.
The error: UndefVarError: thtow not defined
thtow
The fix: I was able to resolve this issue by changing thtow to throw line 139 in src/template.jl
throw
src/template.jl
The template used:
<table> <thead> <tr> <th>First</th><th>Last</th><th>Phone</th><th>Email</th><th></th> </tr> </thead> <tbody> {% for i in contacts %} <tr> <td>{{ i["first"] }}</td> <td>{{ i["last"] }}</td> <td>{{ i["phone"] }}</td> <td>{{ i["email"] }}</td> <td> <div id="contact-menu-{{ i["id"] }}"> <a href="/contacts/{{ i["id"] }}/edit">Edit</a> <a href="/contacts/{{ i["id"] }}">View</a> </div> </td> </tr> {% end %} </tbody> </table>
Data sent:
test_dict = Dict( "contacts" => [ Dict( "id" => 1, "first" => "John", "last" => "Doe", "phone" => "555-1234", "email" => "john.doe@example.com" ), Dict( "id" => 2, "first" => "Jane", "last" => "Doe", "phone" => "555-1234", "email" => "jane.doe@example.com" ), Dict( "id" => 3, "first" => "Josh", "last" => "Doe", "phone" => "555-1234", "email" => "josh.doe@example.com" ) ] )
p.s. Great work on the package. I have greatly enjoyed using it.
Hi @Justyn-Nissly .
Thanks for your report. I fixed it and released new version v0.4.2.
While learning how to use OteraEngine with Oxygen.jl I got an error when trying to render a template.
The error: UndefVarError:
thtow
not definedThe fix: I was able to resolve this issue by changing
thtow
tothrow
line 139 insrc/template.jl
The template used:
Data sent:
p.s. Great work on the package. I have greatly enjoyed using it.