c.l.w.v.SQLObjectVocabularyBase : class documentation

Part of canonical.launchpad.webapp.vocabulary View In Hierarchy

Known subclasses: canonical.launchpad.vocabularies.dbobjects.BugTrackerVocabulary, canonical.launchpad.vocabularies.dbobjects.BugVocabulary, canonical.launchpad.vocabularies.dbobjects.BugWatchVocabulary, canonical.launchpad.vocabularies.dbobjects.ComponentVocabulary, canonical.launchpad.vocabularies.dbobjects.CountryNameVocabulary, canonical.launchpad.vocabularies.dbobjects.FilteredDistroArchSeriesVocabulary, canonical.launchpad.vocabularies.dbobjects.FilteredLanguagePackVocabularyBase, canonical.launchpad.vocabularies.dbobjects.LanguageVocabulary, canonical.launchpad.vocabularies.dbobjects.PackageReleaseVocabulary, canonical.launchpad.vocabularies.dbobjects.PPAVocabulary, canonical.launchpad.vocabularies.dbobjects.TranslationMessageVocabulary, canonical.launchpad.vocabularies.dbobjects.TranslationTemplateVocabulary, canonical.launchpad.webapp.vocabulary.NamedSQLObjectVocabulary, lp.blueprints.vocabularies.specificationdependency.SpecificationDepCandidatesVocabulary, lp.code.vocabularies.branch.BranchVocabularyBase, 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

Implements interfaces: zope.schema.interfaces.IVocabulary, zope.schema.interfaces.IVocabularyTokenized

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 getQuery Undocumented
Method getTerm Undocumented
Method getTermByToken Undocumented
Method emptySelectResults Return a SelectResults object without any elements.
def __init__(self, context=None):
Undocumented
def searchForTerms(self, query=None):
Undocumented
def search(self):
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 getQuery(self):
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 2010-09-27 00:00:11.