Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Z
Zope
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
Zope
Commits
6eeca8d1
Commit
6eeca8d1
authored
Jun 12, 2010
by
Hanno Schlichting
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Factor out zope.schema.vocabulary support
parent
627b5f22
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
3 deletions
+7
-3
src/Zope2/App/schema.py
src/Zope2/App/schema.py
+5
-0
src/Zope2/App/startup.py
src/Zope2/App/startup.py
+2
-3
No files found.
src/Zope2/App/schema.py
View file @
6eeca8d1
...
...
@@ -16,6 +16,7 @@ from zope.component import getUtility
from
zope.interface
import
implements
from
zope.schema.interfaces
import
IVocabularyFactory
from
zope.schema.interfaces
import
IVocabularyRegistry
from
zope.schema.vocabulary
import
setVocabularyRegistry
class
Zope2VocabularyRegistry
(
object
):
...
...
@@ -30,3 +31,7 @@ class Zope2VocabularyRegistry(object):
"""
factory
=
getUtility
(
IVocabularyFactory
,
name
)
return
factory
(
context
)
def
configure_vocabulary_registry
():
setVocabularyRegistry
(
Zope2VocabularyRegistry
())
src/Zope2/App/startup.py
View file @
6eeca8d1
...
...
@@ -16,7 +16,6 @@
from
zope.component
import
queryMultiAdapter
from
zope.event
import
notify
from
zope.processlifetime
import
DatabaseOpened
from
zope.schema.vocabulary
import
setVocabularyRegistry
from
AccessControl.SecurityManagement
import
newSecurityManager
from
AccessControl.SecurityManagement
import
noSecurityManager
...
...
@@ -110,8 +109,8 @@ def startup():
load_site
()
# Set up Zope2 specific vocabulary registry
from
.schema
import
Zope2VocabularyR
egistry
setVocabularyRegistry
(
Zope2VocabularyRegistry
()
)
from
.schema
import
configure_vocabulary_r
egistry
configure_vocabulary_registry
(
)
# Set up the "app" object that automagically opens
# connections
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment