Beispiel #1
0
    def __init__(self, request):
        super(Admin, self).__init__(request)

        # Current add_route() view config sets Admin instance as request.root when traversing inside admin.
        # Assume this admin instance lives directly under the root
        self.__parent__ = Root(request)
        self.__name__ = "admin"

        self.admin_menu_entry = None
        self.quick_menu_entry = None

        # Registered child resources, usually put in AdminConstruct event
        self.children = {}

        self.construct()
Beispiel #2
0
def route_factory(request):
    """Set up __parent__ and __name__ pointers required for traversal."""
    wallet_root = WalletFolder(request)
    root = Root.root_factory(request)
    return Resource.make_lineage(root, wallet_root, "wallet")
Beispiel #3
0
def container_factory(request):
    """Set up __parent__ and __name__ pointers required for traversal for container root."""
    container = SampleContainer(request, "Container folder")
    root = Root.root_factory(request)
    return Resource.make_lineage(root, container, "container")
Beispiel #4
0
def container_factory(request):
    """Set up __parent__ and __name__ pointers required for traversal for container root."""
    container = SampleContainer(request, "Container folder")
    root = Root.root_factory(request)
    return Resource.make_lineage(root, container, "container")
Beispiel #5
0
def route_factory(request):
    """Set up __parent__ and __name__ pointers required for traversal."""
    folder = NetworkFolder(request)
    root = Root.root_factory(request)
    return Resource.make_lineage(root, folder, "blockchain")
Beispiel #6
0
def route_factory(request):
    """Set up __parent__ and __name__ pointers required for traversal."""
    folder = NetworkFolder(request)
    root = Root.root_factory(request)
    return Resource.make_lineage(root, folder, "blockchain")
Beispiel #7
0
def route_factory(request):
    """Set up __parent__ and __name__ pointers required for traversal."""
    wallet_root = WalletFolder(request)
    root = Root.root_factory(request)
    return Resource.make_lineage(root, wallet_root, "wallet")
Beispiel #8
0
def blog_container_factory(request) -> BlogContainer:
    """Set up __parent__ and __name__ pointers for BlogContainer required for traversal."""
    folder = BlogContainer(request)
    root = Root.root_factory(request)
    return Resource.make_lineage(root, folder, "blog")