Using Mako with Pyramid causes an error?

As summary: Edit the file development. Ini and add in the section app:MyProject : mako. Directories = myproject:templates Now we can open the file MyProject/myproject/__init__.

Py and add a line like: config. Add_route('foo', '/foo', view='myproject.views. Foo', view_renderer='foo.

Mako') This will render the template located in: MyProject/myproject/templates/foo. Mako Note: MyProject and myproject are the name of YOUR project. Respect the case Remember to do the same configuration in production.

Ini file!

As summary: Edit the file development. Ini and add in the section app:MyProject: mako. Directories = myproject:templates Now we can open the file /MyProject/myproject/__init__.

Py and add a line like: config. Add_route('foo', '/foo', view='myproject.views. Foo', view_renderer='foo.

Mako') This will render the template located in: /MyProject/myproject/templates/foo. Mako Note: MyProject and myproject are the name of YOUR project. Respect the case.

Remember to do the same configuration in production. Ini file!

Thank you, very helpful. – sidewinder May 1 at 13:16.

It happens because the mako. Templates specifiction is in the format of package:directory. Therefore you must have a package called, in your case, "TestProject".

You may have a package for your project, but it's apparently not called "TestProject".

Ah yes, thank you in my case the package name was called testproject and not TestProject. – sidewinder Feb 20 at 23:37.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions