l.s.w.v.NamedSQLObjectVocabulary(SQLObjectVocabularyBase) : class documentation

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

Known subclasses: lp.blueprints.vocabularies.sprint.FutureSprintVocabulary, lp.blueprints.vocabularies.sprint.SprintVocabulary, lp.bugs.vocabularies.BugNominatableSeriesVocabularyBase, lp.buildmaster.vocabularies.ProcessorVocabulary, lp.registry.vocabularies.CommercialProjectsVocabulary, lp.registry.vocabularies.DistributionVocabulary, lp.registry.vocabularies.DistroSeriesVocabulary, lp.registry.vocabularies.KarmaCategoryVocabulary, lp.services.webapp.vocabulary.NamedSQLObjectHugeVocabulary, lp.translations.vocabularies.TranslationGroupVocabulary

A SQLObjectVocabulary base for database tables that have a unique and ASCII name column.

Provides all methods required by IHugeVocabulary, although it doesn't actually specify this interface since it may not actually be huge and require the custom widgets.

Method toTerm See SQLObjectVocabularyBase.
Method getTermByToken Undocumented
Method search Return terms where query is a subtring of the name.

Inherited from SQLObjectVocabularyBase:

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

Inherited from FilteredVocabularyBase (via SQLObjectVocabularyBase):

Method __getattribute__ Undocumented
Method supportedFilters Undocumented
def toTerm(self, obj):
See SQLObjectVocabularyBase.

This implementation uses name as a token instead of the object's ID, and tries to be smart about deciding to present an object's title if it has one.

def getTermByToken(self, token):
def search(self, query, vocab_filter=None):
Return terms where query is a subtring of the name.
API Documentation for Launchpad, generated by pydoctor at 2019-07-19 00:00:17.