Skip to content

Frequently Asked Questions#

Does Proper Forms works with ____?#

Most likely yes.

Request/Form Input#

Here are some of the popular libraries to are known to work with Proper Forms, but if it’s not listed, it doesn’t mean it won’t work.

  • Django.
  • Werkzeug: Flask, etc.
  • Webob: Pyramid, Morepath, Turbogears, Google App Engine, etc.
  • Any other cgi.FieldStorage-type multidict: Falcon, Bottle, etc.

Database ORMs#

Pretty much any ORM anything should work, as long as data objects allow attribute access to their members.

This is the complete code for creating and updating the objects:

class Form:
    ...

    def create_object(self, data):
        return self._model(**data)

    def update_object(self, data):
        for key, value in data.items():
            setattr(self._object, key, value)
        return self._object

You will still need to persists it to your database as you usually do, for example db.session.add(obj); db.session.commit() with SQLALchemy or maybe obj.save() if you use Peewee.

Does Proper Forms handle file uploads or image thumbanils?#

It does not. Those are concerns for your framework or for other specialized libraries. Proper Forms has a File field which will let you render a file input, but it doesn’t do more than that.