Skip to content

Commit

Permalink
Moved directive site from Grok to this package
Browse files Browse the repository at this point in the history
  • Loading branch information
trollfot committed Apr 27, 2012
1 parent bcc352d commit f71ee55
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/grokcore/site/__init__.py
Expand Up @@ -14,7 +14,7 @@


from grokcore.component import *
from grokcore.site.directive import local_utility
from grokcore.site.directive import site, local_utility
from grokcore.site.components import Site, LocalUtility
from grokcore.site.util import getApplication

Expand Down
10 changes: 10 additions & 0 deletions src/grokcore/site/directive.py
Expand Up @@ -25,6 +25,16 @@
from martian import util
from martian.error import GrokImportError


class site(martian.Directive):
"""This directive is used to indicate the Grok site
object for which the component should be used/registered.
"""
scope = martian.CLASS
store = martian.ONCE
validate = martian.validateInterfaceOrClass


class local_utility(martian.Directive):
"""The `grokcore.site.local_utility()` directive.
Expand Down

0 comments on commit f71ee55

Please sign in to comment.