This repository has been archived on 2020-09-29. You can view files and clone it, but cannot push or open issues or pull requests.
2019-02-16 20:05:09 +03:00
|
|
|
from flatfilecms.models import Folder
|
2018-10-15 01:43:11 +03:00
|
|
|
|
|
|
|
|
|
|
|
class Root(Folder):
|
2019-05-21 20:31:11 +03:00
|
|
|
def __init__(self, path):
|
2018-10-15 01:43:11 +03:00
|
|
|
super(Root, self).__init__('', None, path)
|
|
|
|
|
2019-05-21 20:31:11 +03:00
|
|
|
|
|
|
|
roots = {}
|
|
|
|
|
|
|
|
|
|
|
|
def root_factory(request):
|
|
|
|
path = request.registry.settings['pages_path']
|
|
|
|
return roots.setdefault(path, Root(path))
|