Beispiel #1
0
    def __getitem__(self, key):
        ti = cms.get_type('cms-type:%s'%key)

        if ti is not None:
            return Model(ti, self, self.request)

        raise KeyError(key)
Beispiel #2
0
    def __getitem__(self, key):
        ti = cms.get_type('cms-type:%s'%key)

        if ti is not None:
            return Model(ti, self, self.request)

        raise KeyError(key)
Beispiel #3
0
    def render(self):
        subpath = self.request.subpath
        if subpath and subpath[0]:
            tname = subpath[0]
            tinfo = cms.get_type('cms-type:%s'%tname)
            if tinfo is None:
                raise HTTPNotFound

            form = AddContentForm(tinfo, self, self.request)
            form.update()
            return form.render()

        return super(Adding, self).render()