l.s.w.v.StormVocabularyBase(FilteredVocabularyBase) : class documentation

Part of lp.services.webapp.vocabulary View In Hierarchy

Known subclasses: lp.code.vocabularies.gitrepository.GitRepositoryVocabulary, lp.services.webapp.vocabulary.NamedStormVocabulary, lp.snappy.vocabularies.SnapDistroArchSeriesVocabulary, lp.snappy.vocabularies.SnappyDistroSeriesVocabulary, lp.snappy.vocabularies.SnappySeriesVocabulary

A base class for widgets that are rendered to collect values for attributes that are Storm references.

So if a content class behind some form looks like:

class Foo(StormBase):
id = Int(...) bar_id = Int(...) bar = Reference(bar_id, ...) ...

Then the vocabulary for the widget that captures a value for bar should derive from StormVocabularyBase.

Method __init__ Undocumented
Method searchForTerms Undocumented
Method search Undocumented
Method toTerm Undocumented
Method __iter__ Return an iterator which provides the terms from the vocabulary.
Method __len__ Undocumented
Method __contains__ Undocumented
Method getTerm Undocumented
Method getTermByToken Undocumented
Method emptySelectResults Return a SelectResults object without any elements.
Method _entries Undocumented

Inherited from FilteredVocabularyBase:

Method __getattribute__ Undocumented
Method supportedFilters Undocumented
def __init__(self, context=None):
Undocumented
def searchForTerms(self, query=None, vocab_filter=None):
Undocumented
def search(self, query, vocab_filter=None):
Undocumented
def toTerm(self, obj):
Undocumented
@property
def _entries(self):
Undocumented
def __iter__(self):
Return an iterator which provides the terms from the vocabulary.
def __len__(self):
Undocumented
def __contains__(self, obj):
Undocumented
def getTerm(self, value):
Undocumented
def getTermByToken(self, token):
Undocumented
def emptySelectResults(self):
Return a SelectResults object without any elements.

This is to be used when no search string is given to the search() method of subclasses, in order to be consistent and always return a SelectResults object.

API Documentation for Launchpad, generated by pydoctor at 2019-02-24 00:00:04.