Mercurial > p > roundup > code
view scripts/hyperdb_example.py @ 3913:00896a2acaa5
clean up query display of "Private to you" items
Previously the handling of queries in the edit menu was a little wonky. If
you change a query to not be private to you then you lose the ability to
ever change it back to being private.
Previously the queries were displayed in three chunks: First all retired
queries. Then all queries private to the current user (this batch has the
dropdown for toggling private state). Then all non-private queries.
Now: all queries we created that are retired, all queries that we created
that are not retired, then all non-private queries not created by the
current user.
this should fix [SF#1481394]
| author | Justus Pendleton <jpend@users.sourceforge.net> |
|---|---|
| date | Thu, 20 Sep 2007 23:44:58 +0000 |
| parents | d819ff1b3116 |
| children |
line wrap: on
line source
from roundup.hyperdb import String, Number, Multilink from roundup.backends.back_bsddb import Database, Class class config: DATABASE='/tmp/hyperdb_example' db = Database(config, 'admin') spam = Class(db, 'spam', name=String(), size=Number()) widget = Class(db, 'widget', title=String(), spam=Multilink('spam')) oneid = spam.create(name='one', size=1) twoid = spam.create(name='two', size=2) widgetid = widget.create(title='a widget', spam=[oneid, twoid]) # dumb, simple query print widget.find(spam=oneid) print widget.history(widgetid) print widget.search_text(
