~certify-web-dev/storm/certify-staging

« back to all changes in this revision

Viewing changes to storm/zope/metaconfigure.py

  • Committer: Jamu Kakar
  • Date: 2007-07-17 04:42:52 UTC
  • mto: This revision was merged to the branch mainline in revision 159.
  • Revision ID: jkakar@kakar.ca-20070717044252-k13a6522lk2ep7g2
- Migrated canonical.zstorm code into storm.zope.  Other than updating
  imports the code is unchanged.  ZStormTest.is_supported needs to be
  fleshed out to do the right thing.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
from zope import component
 
2
 
 
3
from storm.zope.interfaces import IZStorm
 
4
 
 
5
 
 
6
def set_default_uri(name, uri):
 
7
    zstorm = component.getUtility(IZStorm)
 
8
    zstorm.set_default_uri(name, uri)
 
9
 
 
10
 
 
11
def store(_context, name, uri):
 
12
    _context.action(discriminator=("store", name),
 
13
                    callable=set_default_uri,
 
14
                    args=(name, uri))
 
15