Pylons / pyramid_jinja2

Jinja2 templating system bindings for the Pyramid web framework
https://docs.pylonsproject.org/projects/pyramid-jinja2/en/latest/
Other
71 stars 58 forks source link

ModuleNotFoundError: No module named 'pyramid_Jinja2' #149

Closed MahamdiAmine closed 6 years ago

MahamdiAmine commented 6 years ago

from wsgiref.simple_server import make_server from pyramid.config import Configurator from pyramid.view import view_config

@view_config(route_name='hello_world', renderer='hello.jinja2') def hello(request): return dict(name='World')

if name == 'main': config = Configurator() config.include('pyramid_jinja2') config.add_route('hello_world', '/') config.scan() app = config.make_wsgi_app() server = make_server('0.0.0.0', 6543, app) print ('Serving at http://127.0.0.1:6543') server.serve_forever()

mcdonc commented 6 years ago

You must install pyramid_jinja2 via e.g.

pip install pyramid_jinja2