I have a problem related around my Pyramid web application. I structured it very similar to that described by Michael Merikel here , except that I use a clean bypass to find my views. (They are declared configured with context = 'path.toResource' name = 'myView'), a fairly standard tariff according to what I can say from the workaround wiki My application has a more complex URL structure: My user resources are under /users/{user_id}, and my projects are under /projects/{project_id}. All my resources are saved using SQLAlchemy ORM; I have a User and Project class with attributes __name__and __parent__, as well as other attributes extending the columns.
/users/{user_id}
/projects/{project_id}
__name__
__parent__
class User(Base): id = Column(...) __name__ = None __parent__ = None Class Project(Base): id = Column(...) __name__ = None __parent__ = None owner_id = Column(...ForeignKey(User.id)) owner = relationship(User,...)
RootFactory, ProjectFactory UserFactory, __name__ __parent__ __get_item__.
__get_item__
, Project Project request.context. , ? project.owner, RootFactory, __parent__ __name__ . , request.resource_url, URL- User, .
SO? request.root? , , User Project? - CrapFactory, SQLAlchemy, ?
?
, , URL-...
, SQLAlchemy . , , node .
2 .
, , . , , . . . User Project resource_id , , , .
User
Project
resource_id
, , request.root, .
request.root
__resource_url__ , .
__resource_url__
, , , , " URL- " , . URL- , .