formalchemy

html parsing with lxml when there's no root tag

走远了吗. 提交于 2019-12-13 16:27:14
问题 I've been building a scaffolding library for sqlalchemy using lxml and formalchemy, and I'm having a hard time getting them to play nicely. specifically, formalchemy.FieldSet.render() returns a fragment of html with no root tag, and I cannot seem to figure out how to get lxml to parse it into something that can be included into an element tree: what I get: >>> lxml.etree.fromstring(formalchemy.FieldSet(toyschema.User(), session).render()) Traceback (most recent call last): File "<stdin>",

Pyramid and FormAlchemy admin interface

ⅰ亾dé卋堺 提交于 2019-12-06 03:25:17
问题 I have a pyramid project using the formalchemy admin interface. I added the basic ACL authentication and the pyramid_formalchemy plugin always denys even though I am authenticated. Any thoughts on how only allow authenticated users to use the pyramid_formalchemy admin interface? The authorization policy was add like this: authn_policy = AuthTktAuthenticationPolicy('MYhiddenSECRET', callback=groupfinder) authz_policy = ACLAuthorizationPolicy() config = Configurator( settings=settings, root

Pyramid and FormAlchemy admin interface

◇◆丶佛笑我妖孽 提交于 2019-12-04 07:34:52
I have a pyramid project using the formalchemy admin interface. I added the basic ACL authentication and the pyramid_formalchemy plugin always denys even though I am authenticated. Any thoughts on how only allow authenticated users to use the pyramid_formalchemy admin interface? The authorization policy was add like this: authn_policy = AuthTktAuthenticationPolicy('MYhiddenSECRET', callback=groupfinder) authz_policy = ACLAuthorizationPolicy() config = Configurator( settings=settings, root_factory='package.auth.RootFactory', authentication_policy=authn_policy, authorization_policy=authz_policy