My favorites | Sign in
Project Logo
                
Details: Show all Hide all

Earlier this year

  • Nov 12, 2009
    issue 23 (request - implement default-if-none filter) reported by mark.peleus   -   It is useful to compile a template without supplying all the vars. {{ value|default_if_none:"nothing" }} http://docs.djangoproject.com/en/dev/ref/templates/builtins/#default-if-none
    It is useful to compile a template without supplying all the vars. {{ value|default_if_none:"nothing" }} http://docs.djangoproject.com/en/dev/ref/templates/builtins/#default-if-none
  • Nov 08, 2009
    issue 22 (Variables in custom tag calls) reported by emmiller   -   (From Bryan Fink) if I create the file template/flash_call with the content: {% load flashvideo %} {% flashvideo dom_id="myvideo" width="800" height="600" static="/ static" path_to_video="/myvid.mp4" path_to_preview_image="/mypic.jpg" %} Then compilation succeeds. But, if I change the dom_id argument to the variable "mydomid" like: {% load flashvideo %} {% flashvideo dom_id=mydomid width="800" height="600" static="/static" path_to_video="/myvid.mp4" path_to_preview_image="/mypic.jpg" %} Compilation fails with this error (apologies for the length): > erlydtl:compile("templates/flash_call", flash_call, [{outdir, "ebin"}]). .:none: internal error in lint_module; crash reason: {function_clause, [{erl_lint,expr, [{{tree,application, {attr,0,[],none}, {application, {tree,module_qualifier, {attr,0,[],none}, {module_qualifier, {tree,atom,{attr,0,[],none},erlydtl_runtime}, {tree,atom,{attr,0,[],none},fetch_value}}}, [{tree,atom,{attr,0,[],none},mydomid}, {tree,variable,{attr,0,[],none},'Variables'}]}}, {".","mydomid"}}, [{'Variables',{bound,unused,[{".",0}]}}], {lint,function,flash_call,[],[],[], {6, {{module_info,1}, {{module_info,0},{{dependencies,0},nil,nil},nil}, {{render,0},nil,{{render,1},nil,{{source, 0},nil,nil}}}}}, [], {dict,1,16,16,8,80,48, {[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[]}, {{[],[],[],[],[],[],[], [[erlang|erlang]], [],[],[],[],[],[],[],[]}}}, [binary,verbose,report_errors], {dict,0,16,16,8,80,48, {[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[]}, {{[],[],[],[],[],[],[],[],[],[],[],[],[],[],[], []}}}, {8, {{module_info,1}, {{module_info,0},{{dependencies,0},nil,nil},nil}, {{record_info,2}, nil, {{render,0}, nil, {{render,1}, nil, {{source,0},{{render2,1},nil,nil},nil}}}}}}, [],[], {render2,1}, 1, [bif_clash,deprecated_function,obsolete_guard,shadow_vars, unused_function,unused_record,unused_vars], [],[],[],".",false,false,false, [{{render2,1},{".",0}}, {{render,1},{".",0}}, {{dependencies,0},{".",0}}, {{source,0},{".",0}}, {{render,1},{".",0}}, {{render,0},{".",0}}, {{module_info,0},0}, {{module_info,1},0}, {{record_info,2},0}], {usage, {dict,3,16,16,8,80,48, {[],[],[],[],[],[],[],[],[],[],[],[],[],[],[], []}, {{[],[],[],[], [[{render,0},{render,1}]], [],[],[],[],[], [[{module_info,1}, {module_info,0}, {module_info,1}, {record_info,2}]], [],[], [[{render,1},{render2,1}]], [],[]}}}, [], {set,0,16,16,8,80,48, {[],[],[],[],[],[],[],[],[],[],[],[],[],[],[], []}, {{[],[],[],[],[],[],[],[],[],[],[],[],[],[],[], []}}}, {set,0,16,16,8,80,48, {[],[],[],[],[],[],[],[],[],[],[],[],[],[],[], []}, {{[],[],[],[],[],[],[],[],[],[],[],[],[],[],[], []}}}}, {dict,0,16,16,8,80,48, {[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[]}, {{[],[],[],[],[],[],[],[],[],[],[],[],[],[],[], []}}}, {dict,56,16,16,8,80,48, {[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[]}, {{[[{boolean,0}|-1], [{'fun',0}|-1], [{function,0}|-1], [{no_return,0}|-1]], [], [[{'fun',2}|-1]], [[{iodata,0}|-1],[{mfa,0}|-1]], [[{char,0}|-1], [{identifier,0}|-1], [{integer,0}|-1], [{neg_integer,0}|-1], [{non_neg_integer,0}|-1], [{number,0}|-1], [{pos_integer,0}|-1]], [], [[{dict,0}|-1], [{float,0}|-1], [{gb_set,0}|-1], [{iolist,0}|-1], [{list,0}|-1], [{maybe_improper_list,0}|-1], [{nonempty_list,0}|-1], [{nonempty_maybe_improper_list,0}|-1], [{pid,0}|-1], [{port,0}|-1], [{set,0}|-1], [{tid,0}|-1], [{timeout,0}|-1]], [[{byte,0}|-1], [{gb_tree,0}|-1], [{module,0}|-1], [{node,0}|-1], [{none,0}|-1], [{queue,0}|-1], [{reference,0}|-1]], [[{atom,1}|-1], [{maybe_improper_list,2}|-1], [{nonempty_improper_list,2}|-1], [{nonempty_maybe_improper_list,2}|-1]], [[{bitstring,0}|-1], [{nonempty_string,0}|-1], [{range,2}|-1], [{string,0}|-1]], [[{digraph,0}|-1]], [[{any,0}|-1], [{arity,0}|-1], [{array,0}|-1], [{binary,0}|-1]], [], [[{binary,2}|-1],[{integer,1}|-1],[{var,1}|-1]], [[{bool,0}|-1],[{nil,0}|-1]], [[{atom,0}|-1], [{list,1}|-1], [{nonempty_list,1}|-1], [{term,0}|-1]]}}}}]}, {erl_lint,'-expr_list/3-fun-0-',3}, {lists,foldl,3}, {erl_lint,'-expr_list/3-fun-0-',3}, {lists,foldl,3}, {erl_lint,'-expr_list/3-fun-0-',3}, {lists,foldl,3}, {erl_lint,'-expr_list/3-fun-0-',3}]} {error,"compilation failed: templates/flash_call"} erlydtl_parser.yrl and erlydtl_compiler.erl look to me like they both want to support this usage pattern, but after quite a bit of flailing, I've failed to figure out the incantation to make it happen. OTP release: R12B01 ErlyDTL version: 0.5.3 (downloaded just a couple of days ago as tarball on google code front page)
    (From Bryan Fink) if I create the file template/flash_call with the content: {% load flashvideo %} {% flashvideo dom_id="myvideo" width="800" height="600" static="/ static" path_to_video="/myvid.mp4" path_to_preview_image="/mypic.jpg" %} Then compilation succeeds. But, if I change the dom_id argument to the variable "mydomid" like: {% load flashvideo %} {% flashvideo dom_id=mydomid width="800" height="600" static="/static" path_to_video="/myvid.mp4" path_to_preview_image="/mypic.jpg" %} Compilation fails with this error (apologies for the length): > erlydtl:compile("templates/flash_call", flash_call, [{outdir, "ebin"}]). .:none: internal error in lint_module; crash reason: {function_clause, [{erl_lint,expr, [{{tree,application, {attr,0,[],none}, {application, {tree,module_qualifier, {attr,0,[],none}, {module_qualifier, {tree,atom,{attr,0,[],none},erlydtl_runtime}, {tree,atom,{attr,0,[],none},fetch_value}}}, [{tree,atom,{attr,0,[],none},mydomid}, {tree,variable,{attr,0,[],none},'Variables'}]}}, {".","mydomid"}}, [{'Variables',{bound,unused,[{".",0}]}}], {lint,function,flash_call,[],[],[], {6, {{module_info,1}, {{module_info,0},{{dependencies,0},nil,nil},nil}, {{render,0},nil,{{render,1},nil,{{source, 0},nil,nil}}}}}, [], {dict,1,16,16,8,80,48, {[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[]}, {{[],[],[],[],[],[],[], [[erlang|erlang]], [],[],[],[],[],[],[],[]}}}, [binary,verbose,report_errors], {dict,0,16,16,8,80,48, {[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[]}, {{[],[],[],[],[],[],[],[],[],[],[],[],[],[],[], []}}}, {8, {{module_info,1}, {{module_info,0},{{dependencies,0},nil,nil},nil}, {{record_info,2}, nil, {{render,0}, nil, {{render,1}, nil, {{source,0},{{render2,1},nil,nil},nil}}}}}}, [],[], {render2,1}, 1, [bif_clash,deprecated_function,obsolete_guard,shadow_vars, unused_function,unused_record,unused_vars], [],[],[],".",false,false,false, [{{render2,1},{".",0}}, {{render,1},{".",0}}, {{dependencies,0},{".",0}}, {{source,0},{".",0}}, {{render,1},{".",0}}, {{render,0},{".",0}}, {{module_info,0},0}, {{module_info,1},0}, {{record_info,2},0}], {usage, {dict,3,16,16,8,80,48, {[],[],[],[],[],[],[],[],[],[],[],[],[],[],[], []}, {{[],[],[],[], [[{render,0},{render,1}]], [],[],[],[],[], [[{module_info,1}, {module_info,0}, {module_info,1}, {record_info,2}]], [],[], [[{render,1},{render2,1}]], [],[]}}}, [], {set,0,16,16,8,80,48, {[],[],[],[],[],[],[],[],[],[],[],[],[],[],[], []}, {{[],[],[],[],[],[],[],[],[],[],[],[],[],[],[], []}}}, {set,0,16,16,8,80,48, {[],[],[],[],[],[],[],[],[],[],[],[],[],[],[], []}, {{[],[],[],[],[],[],[],[],[],[],[],[],[],[],[], []}}}}, {dict,0,16,16,8,80,48, {[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[]}, {{[],[],[],[],[],[],[],[],[],[],[],[],[],[],[], []}}}, {dict,56,16,16,8,80,48, {[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[]}, {{[[{boolean,0}|-1], [{'fun',0}|-1], [{function,0}|-1], [{no_return,0}|-1]], [], [[{'fun',2}|-1]], [[{iodata,0}|-1],[{mfa,0}|-1]], [[{char,0}|-1], [{identifier,0}|-1], [{integer,0}|-1], [{neg_integer,0}|-1], [{non_neg_integer,0}|-1], [{number,0}|-1], [{pos_integer,0}|-1]], [], [[{dict,0}|-1], [{float,0}|-1], [{gb_set,0}|-1], [{iolist,0}|-1], [{list,0}|-1], [{maybe_improper_list,0}|-1], [{nonempty_list,0}|-1], [{nonempty_maybe_improper_list,0}|-1], [{pid,0}|-1], [{port,0}|-1], [{set,0}|-1], [{tid,0}|-1], [{timeout,0}|-1]], [[{byte,0}|-1], [{gb_tree,0}|-1], [{module,0}|-1], [{node,0}|-1], [{none,0}|-1], [{queue,0}|-1], [{reference,0}|-1]], [[{atom,1}|-1], [{maybe_improper_list,2}|-1], [{nonempty_improper_list,2}|-1], [{nonempty_maybe_improper_list,2}|-1]], [[{bitstring,0}|-1], [{nonempty_string,0}|-1], [{range,2}|-1], [{string,0}|-1]], [[{digraph,0}|-1]], [[{any,0}|-1], [{arity,0}|-1], [{array,0}|-1], [{binary,0}|-1]], [], [[{binary,2}|-1],[{integer,1}|-1],[{var,1}|-1]], [[{bool,0}|-1],[{nil,0}|-1]], [[{atom,0}|-1], [{list,1}|-1], [{nonempty_list,1}|-1], [{term,0}|-1]]}}}}]}, {erl_lint,'-expr_list/3-fun-0-',3}, {lists,foldl,3}, {erl_lint,'-expr_list/3-fun-0-',3}, {lists,foldl,3}, {erl_lint,'-expr_list/3-fun-0-',3}, {lists,foldl,3}, {erl_lint,'-expr_list/3-fun-0-',3}]} {error,"compilation failed: templates/flash_call"} erlydtl_parser.yrl and erlydtl_compiler.erl look to me like they both want to support this usage pattern, but after quite a bit of flailing, I've failed to figure out the incantation to make it happen. OTP release: R12B01 ErlyDTL version: 0.5.3 (downloaded just a couple of days ago as tarball on google code front page)
  • Nov 02, 2009
    issue 21 (Patch: process dictionary for render variables) commented on by rapsey   -   Oh and render call is simply: my_page:render(dict)
    Oh and render call is simply: my_page:render(dict)
  • Nov 02, 2009
    issue 21 (Patch: process dictionary for render variables) reported by rapsey   -   Why: - It is the fastest and I think easiest way to construct (for the erlydtl user) and lookup render variables (for the erlydtl itself). - I know using the process dictionary is usually a bad idea, but I don't think it is a big deal in this case. Rendering is basically the last step (if you use it for websites) of whatever processing you need to do. Usage example: {% for sport in sport_list %} {{ sport.name }} {% for league in sport.leagues %} {{sport.id}} - {{ league }} {% endfor %} {% endfor %} % {key,val} in the process dictionary. sport_list is a list % of dictionary keys incased in a {dict,_} tuple. % {sport_list,[{dict, {sport_list,"basketball"}}]} % {{{sport_list, "basketball"},name}, "basketball"} % {{{sport_list, "basketball"},id}, "1000"} % {{{sport_list, "basketball"},leagues}, ["Euro 2009","Euro 2008"]} Simple 4 lines to add in erlydtl_runtime.erl to make it work: find_value(Key,dict) -> get(Key); find_value(Key,{dict,Cont}) -> get({Cont,Key}); ....the rest of find_value
    Why: - It is the fastest and I think easiest way to construct (for the erlydtl user) and lookup render variables (for the erlydtl itself). - I know using the process dictionary is usually a bad idea, but I don't think it is a big deal in this case. Rendering is basically the last step (if you use it for websites) of whatever processing you need to do. Usage example: {% for sport in sport_list %} {{ sport.name }} {% for league in sport.leagues %} {{sport.id}} - {{ league }} {% endfor %} {% endfor %} % {key,val} in the process dictionary. sport_list is a list % of dictionary keys incased in a {dict,_} tuple. % {sport_list,[{dict, {sport_list,"basketball"}}]} % {{{sport_list, "basketball"},name}, "basketball"} % {{{sport_list, "basketball"},id}, "1000"} % {{{sport_list, "basketball"},leagues}, ["Euro 2009","Euro 2008"]} Simple 4 lines to add in erlydtl_runtime.erl to make it work: find_value(Key,dict) -> get(Key); find_value(Key,{dict,Cont}) -> get({Cont,Key}); ....the rest of find_value
  • Oct 25, 2009
    issue 20 (allow binary type to be used as keys) Status changed by emmiller   -   Fixed in r165.
    Status: Fixed
    Fixed in r165.
    Status: Fixed
  • Oct 25, 2009
    r165 (Permit binaries as proplist keys ) committed by emmiller   -   Permit binaries as proplist keys
    Permit binaries as proplist keys
  • Oct 24, 2009
    issue 20 (allow binary type to be used as keys) reported by sendtopms   -   Currently binary type is not allowed in erldtl. Is there a way to allow binary as key? This is very important for medium to big projects.
    Currently binary type is not allowed in erldtl. Is there a way to allow binary as key? This is very important for medium to big projects.
  • Sep 28, 2009
    r164 (Adding some EDoc, and getting rid of a Make-time warning ) committed by emmiller   -   Adding some EDoc, and getting rid of a Make-time warning
    Adding some EDoc, and getting rid of a Make-time warning
  • Sep 26, 2009
    r163 (* More Erlang-y error messages * Allow proplist variables to...) committed by emmiller   -   * More Erlang-y error messages * Allow proplist variables to be keyed with strings (not just atoms)
    * More Erlang-y error messages * Allow proplist variables to be keyed with strings (not just atoms)
  • Sep 19, 2009
    issue 18 (if test don't work with proplists) Status changed by emmiller   -   Discussed/closed on the mailing list: http://groups.google.com/group/erlydtl/browse_thread/thread/d9cac9037b40645e
    Status: Invalid
    Discussed/closed on the mailing list: http://groups.google.com/group/erlydtl/browse_thread/thread/d9cac9037b40645e
    Status: Invalid
  • Sep 19, 2009
    issue 19 (Patch: firstof functionality) reported by sp0n9e   -   It's somewhat of a hack, but I've made the firstof keyword generate an if/else structure using the yrl file. Please excuse the sloppy Erlang code. segment at the bottom, there's probably a cleaner way of doing this, but I needed the functionality to work ASAP.
    It's somewhat of a hack, but I've made the firstof keyword generate an if/else structure using the yrl file. Please excuse the sloppy Erlang code. segment at the bottom, there's probably a cleaner way of doing this, but I needed the functionality to work ASAP.
  • Sep 04, 2009
    issue 18 (if test don't work with proplists) reported by bchesneau   -   I've a template that do {% if errors.username %}{{ errors.username }}{% else %}{% endif %} and index_template:render([{errors, [{username, <<"some error">>}]}]) If I display {{ errors.username }} in the template, error is displayed. But in if nothing change and only id displayed. Any idee what could be the problem ?
    I've a template that do {% if errors.username %}{{ errors.username }}{% else %}{% endif %} and index_template:render([{errors, [{username, <<"some error">>}]}]) If I display {{ errors.username }} in the template, error is displayed. But in if nothing change and only id displayed. Any idee what could be the problem ?
  • Aug 27, 2009
    issue 17 (Iterating a tuple with FOR?) reported by matteo.redaelli   -   In the wiki I found "FOR loops over a list or tuple" but it seems that it doesn't work... {% for val in mytuple %} {{val}} {% endfor %} regards matteo http://www.redaelli.org/matteo/
    In the wiki I found "FOR loops over a list or tuple" but it seems that it doesn't work... {% for val in mytuple %} {{val}} {% endfor %} regards matteo http://www.redaelli.org/matteo/
  • Aug 12, 2009
    issue 11 (Can't do relative include within extends) Status changed by emmiller   -   Fixed in r157.
    Status: Fixed
    Fixed in r157.
    Status: Fixed
  • Aug 12, 2009
    erlydtl-0.5.3.tar.gz (ErlyDTL 0.5.3) file uploaded by emmiller
  • Aug 12, 2009
    r162 (Tagging ErlyDTL 0.5.3 for release ) committed by emmiller   -   Tagging ErlyDTL 0.5.3 for release
    Tagging ErlyDTL 0.5.3 for release
  • Aug 12, 2009
    issue 13 (Make fails when ebin directory is not present) Status changed by emmiller   -   Fixed in r161.
    Status: Fixed
    Fixed in r161.
    Status: Fixed
  • Aug 12, 2009
    r161 (Create "ebin" directory if it does not exist. Thanks to uri...) committed by emmiller   -   Create "ebin" directory if it does not exist. Thanks to uri.sharf for the bug report, ja...@nialscorva.net for the patch.
    Create "ebin" directory if it does not exist. Thanks to uri.sharf for the bug report, ja...@nialscorva.net for the patch.
  • Aug 10, 2009
    issue 14 ([Enhancement Request] Enable calling a restricted set of fun...) commented on by dmitriid   -   Sorry, it turns out I have a version earlier than r151 My "patch" is unnecessary
    Sorry, it turns out I have a version earlier than r151 My "patch" is unnecessary
  • Aug 09, 2009
    issue 14 ([Enhancement Request] Enable calling a restricted set of fun...) commented on by dmitriid   -   Ok, I have a patch to allow calalble function in erlydtl. See http://github.com/dmitriid/beepbeep/commit/57e5e2f6b5f17d0f00e310a24e0bec69e0656f5a (it all revolves around — erlydtl_runtime.erl) You can now pass the following to erlydtl: [ {callable, fun() -> "Hello, world" end}, {callable2, fun() -> [{h, "Hello, world 2"}] end}, {callable3, fun() -> [{h, fun() -> "Hello, world 3" end}] end} {callable4, fun() -> [{h, fun() -> [{h, "Hello, world 4"}] end}] end} ] and write the following in your template: {{ callable }} {{ callable2.h }} {{ callable3.h }} {{ callable4.h.h }} This will actuall somewhat mimic django's behaviour which lets you pass in arbitrary objects to render as long as they define a __unicode__ method. You can now pass in arbitrary functions as long as they return a string :)
    Ok, I have a patch to allow calalble function in erlydtl. See http://github.com/dmitriid/beepbeep/commit/57e5e2f6b5f17d0f00e310a24e0bec69e0656f5a (it all revolves around — erlydtl_runtime.erl) You can now pass the following to erlydtl: [ {callable, fun() -> "Hello, world" end}, {callable2, fun() -> [{h, "Hello, world 2"}] end}, {callable3, fun() -> [{h, fun() -> "Hello, world 3" end}] end} {callable4, fun() -> [{h, fun() -> [{h, "Hello, world 4"}] end}] end} ] and write the following in your template: {{ callable }} {{ callable2.h }} {{ callable3.h }} {{ callable4.h.h }} This will actuall somewhat mimic django's behaviour which lets you pass in arbitrary objects to render as long as they define a __unicode__ method. You can now pass in arbitrary functions as long as they return a string :)
  • Aug 09, 2009
    issue 13 (Make fails when ebin directory is not present) commented on by dmitriid   -   Ok, I have a patch to allow calalble function in erlydtl. See http://github.com/dmitriid/beepbeep/commit/57e5e2f6b5f17d0f00e310a24e0bec69e0656f5a (it all revolves around — erlydtl_runtime.erl) You can now pass the following to erlydtl: [ {callable, fun() -> "Hello, world" end}, {callable2, fun() -> [{h, "Hello, world 2"}] end}, {callable3, fun() -> [{h, fun() -> "Hello, world 3" end}] end} {callable4, fun() -> [{h, fun() -> [{h, "Hello, world 4"}] end}] end} ] and write the following in your template: {{ callable }} {{ callable2.h }} {{ callable3.h }} {{ callable4.h.h }} This will actuall somewhat mimic django's behaviour which lets you pass in arbitrary objects to render as long as they define a __unicode__ method. You can now pass in arbitrary functions as long as they return a string :)
    Ok, I have a patch to allow calalble function in erlydtl. See http://github.com/dmitriid/beepbeep/commit/57e5e2f6b5f17d0f00e310a24e0bec69e0656f5a (it all revolves around — erlydtl_runtime.erl) You can now pass the following to erlydtl: [ {callable, fun() -> "Hello, world" end}, {callable2, fun() -> [{h, "Hello, world 2"}] end}, {callable3, fun() -> [{h, fun() -> "Hello, world 3" end}] end} {callable4, fun() -> [{h, fun() -> [{h, "Hello, world 4"}] end}] end} ] and write the following in your template: {{ callable }} {{ callable2.h }} {{ callable3.h }} {{ callable4.h.h }} This will actuall somewhat mimic django's behaviour which lets you pass in arbitrary objects to render as long as they define a __unicode__ method. You can now pass in arbitrary functions as long as they return a string :)
  • Aug 04, 2009
    issue 13 (Make fails when ebin directory is not present) Status changed by emmiller   -   Thank you for the bug report. This will be fixed in the next release.
    Status: Accepted
    Thank you for the bug report. This will be fixed in the next release.
    Status: Accepted
  • Aug 04, 2009
    issue 16 (Can't use ifequal/ifnotequal to compare an atom and a list) Status changed by emmiller   -   Perfect. Committed in r160.
    Status: Fixed
    Perfect. Committed in r160.
    Status: Fixed
  • Aug 04, 2009
    r160 (1. "|join" processes iodata() 2. atoms can be compared to li...) committed by emmiller   -   1. "|join" processes iodata() 2. atoms can be compared to lists in "ifequal" clause Thanks to indogus, insane, and kiszl for bug reports and patches.
    1. "|join" processes iodata() 2. atoms can be compared to lists in "ifequal" clause Thanks to indogus, insane, and kiszl for bug reports and patches.
  • Aug 02, 2009
    issue 16 (Can't use ifequal/ifnotequal to compare an atom and a list) commented on by indogus   -   Of course. Sorry, I thought have thought of that before. Here's a patch to the unit test module. Let me know if you'd like to see any more test cases.
    Of course. Sorry, I thought have thought of that before. Here's a patch to the unit test module. Let me know if you'd like to see any more test cases.
  • Aug 02, 2009
    issue 15 (Enhancement Request: Support variables in include tags) commented on by emmiller   -   Unfortunately ErlyDTL's design will make this feature hard to implement. But since it is part of Django it should be done someday.
    Unfortunately ErlyDTL's design will make this feature hard to implement. But since it is part of Django it should be done someday.
  • Aug 02, 2009
    issue 16 (Can't use ifequal/ifnotequal to compare an atom and a list) Status changed by emmiller   -  
    Status: Accepted
    Status: Accepted
  • Aug 02, 2009
    issue 16 (Can't use ifequal/ifnotequal to compare an atom and a list) commented on by emmiller   -   Thanks for the patch; I approve the change in behavior. However, can you add a test to the test suite to prove your patch works as advertised? Add it to trunk/src/tests/ erlydtl_unittests.erl
    Thanks for the patch; I approve the change in behavior. However, can you add a test to the test suite to prove your patch works as advertised? Add it to trunk/src/tests/ erlydtl_unittests.erl
  • Jul 30, 2009
    issue 16 (Can't use ifequal/ifnotequal to compare an atom and a list) commented on by indogus   -   (Sorry, the patch has an extraneous first chunk which is just a formatting error. My mistake for not proofreading it first.)
    (Sorry, the patch has an extraneous first chunk which is just a formatting error. My mistake for not proofreading it first.)
  • Jul 30, 2009
    issue 16 (Can't use ifequal/ifnotequal to compare an atom and a list) reported by indogus   -   What steps will reproduce the problem? 1. Create a template with {% ifequal color "red" %}RED{% endif %} inside it 2. Compile template, and call compiled_template:render({color, red}). 3. The ifequal returns false, because 'red' =/= "red". DTL has no concept of atoms, so it's understandably impossible to specify an atom literal in the template itself. This means you cannot use isequal/isnotequal with an atom value. Given this, I think it's reasonable for an atom to equal a string at runtime, provided atom_to_list(AtomVal) =:= ListVal. I've attached a patch to erlydtl_runtime.erl version 0.5.2 that makes this change, in the are_equal() method. What version of the product are you using? On what operating system? 0.5.2 on Linux. Thanks again for the great package, extremely useful. :).
    What steps will reproduce the problem? 1. Create a template with {% ifequal color "red" %}RED{% endif %} inside it 2. Compile template, and call compiled_template:render({color, red}). 3. The ifequal returns false, because 'red' =/= "red". DTL has no concept of atoms, so it's understandably impossible to specify an atom literal in the template itself. This means you cannot use isequal/isnotequal with an atom value. Given this, I think it's reasonable for an atom to equal a string at runtime, provided atom_to_list(AtomVal) =:= ListVal. I've attached a patch to erlydtl_runtime.erl version 0.5.2 that makes this change, in the are_equal() method. What version of the product are you using? On what operating system? 0.5.2 on Linux. Thanks again for the great package, extremely useful. :).
  • Jul 21, 2009
    issue 13 (Make fails when ebin directory is not present) commented on by ja...@nialscorva.net   -   Here's a simple patch that fixes it on systems with mkdir.
    Here's a simple patch that fixes it on systems with mkdir.
  • Jul 14, 2009
    issue 15 (Enhancement Request: Support variables in include tags) reported by indogus   -   What steps will reproduce the problem? 1. Create template containing {% include some_variable %} 2. Attempt to compile template via erlydtl:compile What is the expected output? What do you see instead? The compile fails with a syntax error on some_variable. According to the Django documentation for include (http://docs.djangoproject.com/en/1.0/ref/templates/builtins/#include), include can reference a variable. What version of the product are you using? On what operating system? erlydtl-0.5.2 on linux (from source tarball.) Please provide any additional information below. In the ErlyDTL syntax, include takes a string literal argument and is always evaulated at compile time. This is desired behaviour for static includes (better performance), but it would be great if it also supported including files via variable references. Thanks very much. :).
    What steps will reproduce the problem? 1. Create template containing {% include some_variable %} 2. Attempt to compile template via erlydtl:compile What is the expected output? What do you see instead? The compile fails with a syntax error on some_variable. According to the Django documentation for include (http://docs.djangoproject.com/en/1.0/ref/templates/builtins/#include), include can reference a variable. What version of the product are you using? On what operating system? erlydtl-0.5.2 on linux (from source tarball.) Please provide any additional information below. In the ErlyDTL syntax, include takes a string literal argument and is always evaulated at compile time. This is desired behaviour for static includes (better performance), but it would be great if it also supported including files via variable references. Thanks very much. :).
  • Jun 26, 2009
    issue 14 ([Enhancement Request] Enable calling a restricted set of fun...) commented on by dmitriid   -   See also issue 12. I second your proposal
    See also issue 12. I second your proposal
  • Jun 17, 2009
    r159 (Add crypto to list of application dependencies; "make clean"...) committed by emmiller   -   Add crypto to list of application dependencies; "make clean" nukes ebin/erlydtl.app
    Add crypto to list of application dependencies; "make clean" nukes ebin/erlydtl.app
  • Jun 17, 2009
    issue 14 ([Enhancement Request] Enable calling a restricted set of fun...) reported by zoltan.lajos.kis   -   Have a compiler option for defining functions that can be called from within templates: {functions, [{now, fun erlang:now/0}, {link_to, fun router:get_link/3}] Allow calling these functions from templates directly: {% now %} {% link_to var1 var2 var3 %} or alternatively (using a specific tag): {% fun now %} {% fun link_to var1 var2 var3 %}
    Have a compiler option for defining functions that can be called from within templates: {functions, [{now, fun erlang:now/0}, {link_to, fun router:get_link/3}] Allow calling these functions from templates directly: {% now %} {% link_to var1 var2 var3 %} or alternatively (using a specific tag): {% fun now %} {% fun link_to var1 var2 var3 %}
  • May 21, 2009
    r158 (.app file. Thanks to seth. ) committed by emmiller   -   .app file. Thanks to seth.
    .app file. Thanks to seth.
  • May 14, 2009
    issue 13 (Make fails when ebin directory is not present) reported by uri.sharf   -   What steps will reproduce the problem? 1. Checkout source as per the default instructions on the site (svn checkout http://erlydtl.googlecode.com/svn/trunk/ erlydtl-read-only) 2. Switch into top directory 3. Run make What is the expected output? What do you see instead? Code should compile into ebin. Instead, I get an error message: >> Recompile: src/erlydtl/erlydtl_scanner >> ebin/erlydtl_scanner.bea#: error writing file What version of the product are you using? On what operating system? svn snapshot on os x Please provide any additional information below. No problem when I manually create ebin, or if I checkout including empty directories.
    What steps will reproduce the problem? 1. Checkout source as per the default instructions on the site (svn checkout http://erlydtl.googlecode.com/svn/trunk/ erlydtl-read-only) 2. Switch into top directory 3. Run make What is the expected output? What do you see instead? Code should compile into ebin. Instead, I get an error message: >> Recompile: src/erlydtl/erlydtl_scanner >> ebin/erlydtl_scanner.bea#: error writing file What version of the product are you using? On what operating system? svn snapshot on os x Please provide any additional information below. No problem when I manually create ebin, or if I checkout including empty directories.
  • Mar 31, 2009
    r157 (Issue #11 Rolled back the functionality added in r152 (Issu...) committed by colm.dougan   -   Issue #11 Rolled back the functionality added in r152 ( Issue #9 ). The idea of an auto-changing template root folder is going away because it is not the "Django way". The Djnago way is to have all include paths relative to a base folder (although they do support many base folders, but I digress). Trying to support both systems is too complex and introduces unnecessary ambiguity about the current include path for those doing it the Django way.
    Issue #11 Rolled back the functionality added in r152 ( Issue #9 ). The idea of an auto-changing template root folder is going away because it is not the "Django way". The Djnago way is to have all include paths relative to a base folder (although they do support many base folders, but I digress). Trying to support both systems is too complex and introduces unnecessary ambiguity about the current include path for those doing it the Django way.
  • Mar 30, 2009
    issue 11 (Can't do relative include within extends) commented on by colm.dougan   -   Assuming we have a base file: ################# pre content {% block content %}default content{% endblock %} post ################# And a file which inherits from it but also includes a static include : ######################################## {% extends "path1/base2" %} {% block content %} start_content {% include "path1/include1" %} end_content {% endblock %} ######################################## The include won't work.
    Assuming we have a base file: ################# pre content {% block content %}default content{% endblock %} post ################# And a file which inherits from it but also includes a static include : ######################################## {% extends "path1/base2" %} {% block content %} start_content {% include "path1/include1" %} end_content {% endblock %} ######################################## The include won't work.
  • Mar 26, 2009
    issue 12 ([Enhancement request] user-defined flters) reported by dmitriid   -   Allow passing a {filters, ModuleFilterList} to erlydtl:compile where ModuleFilter = [{Filter, ModuleDefinition}] ModuleDefiition = {Module, Function} Filter = Module = Function = atom And tweak the compiler to call Module:Function when the respective filter is encountered E.g.: erlydtl:compile(File, Module, [{urlencode, {utils, encode}}]) for file {{ url|urlencode}} will call utils:encode(url). Additional anhancement would be to allow for additional options: erlydtl:compile(File, Module, [{dateformat, {utils, dateformat}}]) for file {{ date|dateformat|'Y-m-d'}} would call utils:dateformat(date, ['Y-m-d'])
    Allow passing a {filters, ModuleFilterList} to erlydtl:compile where ModuleFilter = [{Filter, ModuleDefinition}] ModuleDefiition = {Module, Function} Filter = Module = Function = atom And tweak the compiler to call Module:Function when the respective filter is encountered E.g.: erlydtl:compile(File, Module, [{urlencode, {utils, encode}}]) for file {{ url|urlencode}} will call utils:encode(url). Additional anhancement would be to allow for additional options: erlydtl:compile(File, Module, [{dateformat, {utils, dateformat}}]) for file {{ date|dateformat|'Y-m-d'}} would call utils:dateformat(date, ['Y-m-d'])
  • Mar 05, 2009
    r156 (Added a test case to reproduce issue #11. ) committed by colm.dougan   -   Added a test case to reproduce issue #11 .
    Added a test case to reproduce issue #11 .
  • Mar 05, 2009
    issue 11 (Can't do relative include within extends) reported by colm.dougan   -   What steps will reproduce the problem? Run the regression tests. What is the expected output? What do you see instead? I added a test to the regression tests to replicate the problem. erlydtl_functional_tests now crashes when running its tests when it hits the "extends_path2" test. Please use labels and text to provide additional information. I'm pretty sure this is a regression caused by 152 ( issue #9 ).
    What steps will reproduce the problem? Run the regression tests. What is the expected output? What do you see instead? I added a test to the regression tests to replicate the problem. erlydtl_functional_tests now crashes when running its tests when it hits the "extends_path2" test. Please use labels and text to provide additional information. I'm pretty sure this is a regression caused by 152 ( issue #9 ).
  • Feb 28, 2009
    erlydtl-0.5.2.tar.gz (ErlyDTL 0.5.2) file uploaded by emmiller
  • Feb 28, 2009
    r155 (New version: 0.5.2 ) committed by emmiller   -   New version: 0.5.2
    New version: 0.5.2
  • Feb 28, 2009
    Overview (Introduction and notes on creating, compiling and using Erly...) Wiki page edited by emmiller
  • Feb 12, 2009
    issue 10 (Variable substitution in templates should not require spaces) Status changed by emmiller   -   Thank you for researching the behavior in Django. Fixed in r153 with test.
    Status: Fixed
    Thank you for researching the behavior in Django. Fixed in r153 with test.
    Status: Fixed
  • Feb 12, 2009
    r153 (Do not require a space between a variable name and closing b...) committed by emmiller   -   Do not require a space between a variable name and closing bracket, e.g. allow "{{var1}}"
    Do not require a space between a variable name and closing bracket, e.g. allow "{{var1}}"
  • Feb 12, 2009
    issue 10 (Variable substitution in templates should not require spaces) commented on by Vaughn.Clayton   -   Further testing shows that the error only shows up when there is no whitespace between the tag and the closing brackets. Works: {{ var }} Works: {{var }} Doesn't: {{var}} Doesn't: {{ var}}
    Further testing shows that the error only shows up when there is no whitespace between the tag and the closing brackets. Works: {{ var }} Works: {{var }} Doesn't: {{var}} Doesn't: {{ var}}
  • Feb 12, 2009
    issue 10 (Variable substitution in templates should not require spaces) reported by Vaughn.Clayton   -   What steps will reproduce the problem? 1. Compile as a template: <<"Value is: {{var1}}">> What is the expected output? What do you see instead? Expected: ok. Received: {error, "Error: Illegal character line 1 column 17"} What version of the product are you using? On what operating system? erlydtl-0.5.1 Please provide any additional information below. I know that Django's "docs/internals/contributing.txt" says to "put one (and only one) space between the curly brackets and the tag contents". But this merely refers to their preferred coding style. The Django template language does not specify that there must be spaces after the curly brackets and the tag. Their parser will happily deal with no spaces (and probably with any amount of whitespace, but I haven't tested that), and there is at least one file in their codebase (django/views/debug.py) that uses this syntax. erlydtl's parser should loosen up just a bit to allow for spaces.
    What steps will reproduce the problem? 1. Compile as a template: <<"Value is: {{var1}}">> What is the expected output? What do you see instead? Expected: ok. Received: {error, "Error: Illegal character line 1 column 17"} What version of the product are you using? On what operating system? erlydtl-0.5.1 Please provide any additional information below. I know that Django's "docs/internals/contributing.txt" says to "put one (and only one) space between the curly brackets and the tag contents". But this merely refers to their preferred coding style. The Django template language does not specify that there must be spaces after the curly brackets and the tag. Their parser will happily deal with no spaces (and probably with any amount of whitespace, but I haven't tested that), and there is at least one file in their codebase (django/views/debug.py) that uses this syntax. erlydtl's parser should loosen up just a bit to allow for spaces.
  • Feb 11, 2009
    issue 9 (Docroot context doesn't point to right place for included fi...) changed by emmiller   -   Patch looks good, applied.
    Status: Fixed
    Owner: emmiller
    Patch looks good, applied.
    Status: Fixed
    Owner: emmiller
 
Hosted by Google Code