Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update "views" exercise text to promote real templating #125

Open
Pomax opened this issue Jan 13, 2015 · 3 comments · May be fixed by isp1r0/makemehapi#2
Open

update "views" exercise text to promote real templating #125

Pomax opened this issue Jan 13, 2015 · 3 comments · May be fixed by isp1r0/makemehapi#2

Comments

@Pomax
Copy link

Pomax commented Jan 13, 2015

Currently the "views" exercise does not say that the test is to see whether the URL query argument "name" is passed into the template that the user saved to the templates directory; there is nothing in the assignment or hints to directly suggest that the template should have a {{...}} construction in it.

The assignment currently shows the "desired output HTML", so if someone is copy-pasting the hints in order to build out their program (which they will be) there is nothing in the hints to suggest a {{query.name}} is needed in order to pass the test. For people new to hapi/templating, the assignment is likely to end up as "copy the HTML, save as file, return that file on requests for /, done. My program generates the correct output without any templating magic, I'm not sure what I was supposed to learn about templating?".

(Of course, those of us already familiar with mustache/jinja/nunjucks/etc know what is required, but there will be a substantial group for whom this is their first exposure to templating, and the exercise forgets to explicitly say that a {{query.name}} or the like is needed in the HTML that goes in the template's index.html)

lloydbenson added a commit to lloydbenson/makemehapi that referenced this issue Jan 13, 2015
@lloydbenson
Copy link
Contributor

Does this help clarify it better?

@Pomax
Copy link
Author

Pomax commented Jan 13, 2015

left a comment on the PR

@idkjs
Copy link

idkjs commented Mar 6, 2016

The correct answer code passes the test but does not render a usable template in the browser. https://jsfiddle.net/lokal/ws71rc4v/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants