digitalmars.D.learn - Can't rending DT template
- Suliman (19/19) Feb 26 2017 I have this code:
- Suliman (3/3) Feb 26 2017 It's look like wrong error, because project is buildable.
- Suliman (3/6) Feb 26 2017 It's seems that serveStaticFiles is only one normal way to get it
- WebFreak001 (4/23) Feb 26 2017 The error is some syntax or variable error in the diet file. Send
I have this code: module pages; import vibe.d; import database; import vibe.web.web; class MyPages { path("/page1") void getPage() { render!("home.dt"); } } The error: https://snag.gy/PtNeSs.jpg Error: template instance vibe.web.web.render!"home.dt".render!("pages", "pages.MyPages.getPage").render.compileHTMLDietFile!("home.dt", req, DefaultFilters).exec!(StreamOutputRange!(OutputStream)) error instantiating What I am doing wrong? Can I output html page instead of .dt?
Feb 26 2017
It's look like wrong error, because project is buildable. So I have only one question. Can I do response not in .dt, but in .html?
Feb 26 2017
On Sunday, 26 February 2017 at 12:31:21 UTC, Suliman wrote:It's look like wrong error, because project is buildable. So I have only one question. Can I do response not in .dt, but in .html?It's seems that serveStaticFiles is only one normal way to get it work.
Feb 26 2017
On Sunday, 26 February 2017 at 12:22:01 UTC, Suliman wrote:I have this code: module pages; import vibe.d; import database; import vibe.web.web; class MyPages { path("/page1") void getPage() { render!("home.dt"); } } The error: https://snag.gy/PtNeSs.jpg Error: template instance vibe.web.web.render!"home.dt".render!("pages", "pages.MyPages.getPage").render.compileHTMLDietFile!("home.dt", req, DefaultFilters).exec!(StreamOutputRange!(OutputStream)) error instantiating What I am doing wrong? Can I output html page instead of .dt?The error is some syntax or variable error in the diet file. Send us the whole error output and some part from the diet file if you want better feedback
Feb 26 2017