Example #1
0
 def __call__(self, form, **kwargs):
     kwargs['form']=form
     res=callComponent(self.comp_path,
                       argDict=kwargs,
                       compType=DT_DATA,
                       cache=NO)
     return res
Example #2
0
 def __call__(self, form):
     res=callComponent(self.comp_path,
                       argDict={'form' : form},
                       compType=DT_DATA,
                       cache=NO)
     # should be a list of FormErrorMessage objects
     return res or []
Example #3
0
def component(comp, **kwargs):
    comptype = kwargs.pop('comptype', None)
    if comptype is None:
        comptype = guess_comptype(comp)
    if comptype == DT_INCLUDE and kwargs:
        raise ValueError, "includes don't use keyword args!"
    cache = kwargs.pop('cache', NO)
    return callComponent(comp, argDict=kwargs, compType=comptype, cache=cache)
def component(comp, **kwargs):
    comptype=kwargs.pop('comptype', None)
    if comptype is None:
            comptype=guess_comptype(comp)
    if comptype==DT_INCLUDE and kwargs:
            raise ValueError, "includes don't use keyword args!"
    cache=kwargs.pop('cache', NO)    
    return callComponent(comp,
                         argDict=kwargs,
                         compType=comptype,
                         cache=cache)
Example #5
0
def datacomp(comp, **kwargs):
    cache = kwargs.pop('cache', NO)
    return callComponent(comp, argDict=kwargs, compType=DT_DATA, cache=cache)
Example #6
0
def include(comp):
    return callComponent(comp, argDict={}, compType=DT_INCLUDE)
Example #7
0
def stringcomp(comp, **kwargs):
    cache = kwargs.pop('cache', NO)
    return callComponent(comp,
                         argDict=kwargs,
                         compType=DT_REGULAR,
                         cache=cache)
def datacomp(comp, **kwargs):
    cache=kwargs.pop('cache', NO)
    return callComponent(comp,
                         argDict=kwargs,
                         compType=DT_DATA,
                         cache=cache)
def include(comp):
    return callComponent(comp,
                         argDict={},
                         compType=DT_INCLUDE)
def stringcomp(comp, **kwargs):
    cache=kwargs.pop('cache', NO)
    return callComponent(comp,
                         argDict=kwargs,
                         compType=DT_REGULAR,
                         cache=cache)
Example #11
0
 def getView(self):
     return callComponent(self.component,
                          argDict={'model' : self},
                          compType=DT_REGULAR,
                          cache=self.cache)