dsilabs / zoom

A Python Web Framework
Other
6 stars 7 forks source link

Add a catch-all render 'helper' with a default keyword argument #58

Open robinsax opened 5 years ago

robinsax commented 5 years ago

Current behaviour:

When no helper matches {{some_variable}} in a template, the output HTML contains the input string; {{some_variable}}

Expected behaviour:

When no helper matches {{some_variable}} in a template, the output HTML contains an empty string in its place. Template variables should universally support a default keyword argument, such that {{helperless_variable default="default value"}} outputs default value.

hlainchb commented 5 years ago

The way it works now is without the default= part. So, {{helperless "default value"}}.

robinsax commented 5 years ago

Ah, gotcha. I'd label this issue as documentation needed then.

hlainchb commented 5 years ago

Agreed. :)

On Thu, Aug 15, 2019 at 3:05 PM Robin Saxifrage notifications@github.com wrote:

Ah, gotcha. I'd label this issue as documentation needed then.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/dsilabs/zoom/issues/58?email_source=notifications&email_token=AABGIP7RQANZ6VXXUQ3B6N3QEXHIZA5CNFSM4ILZFN2KYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD4NEA7Q#issuecomment-521814142, or mute the thread https://github.com/notifications/unsubscribe-auth/AABGIP5W36HO43YY4RWBNPLQEXHIZANCNFSM4ILZFN2A .

--

Herb Lainchbury, Dynamic Solutions 250.704.6154 http://www.dynamic-solutions.com