work on exposure to support inheritance, start to work on calendar with dynamic loading

This commit is contained in:
bkfox
2016-06-29 01:33:53 +02:00
parent df65d310f5
commit 3d8abd9df8
12 changed files with 446 additions and 184 deletions

View File

@ -53,7 +53,7 @@ class Website:
"""
self.registry = {}
self.exposures = []
self.urls = [ url(r'^exp/', include(self.exposures)) ]
self.urls = [ url(r'^exps/', include(self.exposures)) ]
self.menus = {}
self.__dict__.update(kwargs)
@ -95,10 +95,7 @@ class Website:
for section in sections:
if not hasattr(section, '_exposure'):
continue
self.exposures += [
url for url in section._exposure.items
if url not in self.urls
]
self.exposures += section._exposure.gather(section)
def register(self, name, routes = [], view = views.PageView,
model = None, sections = None,