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

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

Known subclasses: lp.blueprints.vocabularies.specification.SpecificationVocabulary, lp.blueprints.vocabularies.specificationdependency.SpecificationDepCandidatesVocabulary, lp.blueprints.vocabularies.specificationdependency.SpecificationDependenciesVocabulary, lp.bugs.vocabularies.BugTrackerVocabulary, lp.bugs.vocabularies.BugVocabulary, lp.bugs.vocabularies.BugWatchVocabulary, lp.code.vocabularies.branch.BranchVocabulary, lp.code.vocabularies.sourcepackagerecipe.BuildableDistroSeries, lp.registry.vocabularies.FilteredDistroSeriesVocabulary, lp.registry.vocabularies.FilteredProductSeriesVocabulary, lp.registry.vocabularies.MilestoneVocabulary, lp.registry.vocabularies.NonMergedPeopleAndTeamsVocabulary, lp.registry.vocabularies.PersonAccountToMergeVocabulary, lp.registry.vocabularies.ProductReleaseVocabulary, lp.registry.vocabularies.ProductSeriesVocabulary, lp.registry.vocabularies.ProductVocabulary, lp.registry.vocabularies.ProjectGroupVocabulary, lp.registry.vocabularies.UserTeamsParticipationVocabulary, lp.registry.vocabularies.ValidPersonOrTeamVocabulary, lp.services.webapp.vocabulary.NamedSQLObjectVocabulary, lp.services.worlddata.vocabularies.CountryNameVocabulary, lp.services.worlddata.vocabularies.LanguageVocabulary, lp.soyuz.vocabularies.ComponentVocabulary, lp.soyuz.vocabularies.FilteredDistroArchSeriesVocabulary, lp.soyuz.vocabularies.PackageReleaseVocabulary, lp.soyuz.vocabularies.PPAVocabulary, lp.translations.vocabularies.FilteredLanguagePackVocabularyBase, lp.translations.vocabularies.TranslationMessageVocabulary, lp.translations.vocabularies.TranslationTemplateVocabulary

A base class for widgets that are rendered to collect values for attributes that are SQLObjects, e.g. ForeignKey.

So if a content class behind some form looks like:

class Foo(SQLObject):
id = IntCol(...) bar = ForeignKey(...) ...

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

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.

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
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 2022-06-16 00:00:12.