I've been working on an app that uses url dispatch. I setup my root factory based on some great info found here: https://github.com/mmerickel/pyramid_auth_demo (thanks Michael!)
Now I'm trying to use pyramid_formalchemy as well. It seems pyramid_formalchemy uses traversal for determining authorization. That's ok, but I'm stuck on one point...
For traversal objects need to be location-aware which means they need to have a name and parent. So I have a User object.
class User(Base):
__name__ = 'user'
__parent__ = ...
I've defined my desired ACLs in my RootFactory. This all gets setup when the RootFactory's constructor gets called. I'd like to set all my classes' parents to the RootFactory, but create a RootFactory instance you need to pass in a request to the constructor (particularly because my RootFactory subclasses pyramid_formalchemy.resources.Models)
But when setting up my classes I don't have a request.
How can I correctly set parent on my classes to RootFactory?
Thanks.