--- a/src/pyams_i18n/site.py Thu Mar 08 09:07:14 2018 +0100
+++ b/src/pyams_i18n/site.py Sat Mar 10 02:12:03 2018 +0100
@@ -18,29 +18,21 @@
# import interfaces
from pyams_i18n.interfaces import INegotiator
from pyams_utils.interfaces.site import ISiteGenerations
-from zope.site.interfaces import INewLocalSite
# import packages
from pyams_i18n.negotiator import Negotiator
from pyams_utils.registry import utility_config
from pyams_utils.site import check_required_utilities
-from pyramid.events import subscriber
REQUIRED_UTILITIES = ((INegotiator, '', Negotiator, 'Language negotiator'),)
-@subscriber(INewLocalSite)
-def handle_new_local_site(event):
- """Create a new negotiator when a site is created"""
- site = event.manager.__parent__
- check_required_utilities(site, REQUIRED_UTILITIES)
-
-
@utility_config(name='PyAMS I18n', provides=ISiteGenerations)
class I18nGenerationsChecker(object):
"""I18n generations checker"""
+ order = 20
generation = 1
def evolve(self, site, current=None):