1. Dan Jacob
  2. pyramid_simpleform
  3. Issues
Issue #1 resolved

Tutorial issue

created an issue

First time doing this hopefully not breaking any "rules/culture". Just updated to 0.6.1 and am trying out the tutorial (index.rst). The below gives me an error on "from validators...", ImportError: No module named validators

from pyramid.view import view_config

from validators import Schema, validators

If I replace validators with formencode I can proceed. I downloaded the simplesite demo and searched it, it also imported validators from formencode.

A few more items under def add(self): defaults={"name" : "..."}) #has an extra trailing ), needs a comma

return dict(renderer=FormRenderer(form)) #needs to be indented

In simplesite__init.py (just got simplesite from bitbucket): There are four config.add_handler statements cause an error. Looks like we need to install pyramid_handlers and add config.include('pyramid_handlers') to the project's init__.py and change the import in handlers.py:

from pyramid.view import action to

from pyramid_handlers import action

I think that was everything, the page is showing up...


Comments (4)

  1. Dan Jacob repo owner

    I've fixed the syntax errors in the example snippet in the docs. The latest version has also been updated to PyPi:


    The simplesite code was quite old. Handlers were removed from Pyramid core and placed in a separate pyramid_handlers package, so any recent Pyramid install will of course not work. I've updated the example to use the more recent handlers configuration.

  2. Log in to comment