--- a/web/views/calendar.py Tue Feb 17 20:56:45 2009 +0100
+++ b/web/views/calendar.py Tue Feb 17 21:29:58 2009 +0100
@@ -1,7 +1,7 @@
"""html calendar views
:organization: Logilab
-:copyright: 2001-2008 LOGILAB S.A. (Paris, FRANCE), all rights reserved.
+:copyright: 2001-2009 LOGILAB S.A. (Paris, FRANCE), all rights reserved.
:contact: http://www.logilab.fr/ -- mailto:contact@logilab.fr
"""
@@ -13,9 +13,9 @@
from logilab.mtconverter import html_escape
from cubicweb.interfaces import ICalendarable
+from cubicweb.selectors import implements
from cubicweb.common.utils import date_range
from cubicweb.common.uilib import ajax_replace_url
-from cubicweb.common.selectors import implement_interface
from cubicweb.common.registerers import priority_registerer
from cubicweb.common.view import EntityView
@@ -83,8 +83,7 @@
Does apply to ICalendarable compatible entities
"""
__registerer__ = priority_registerer
- __selectors__ = (implement_interface,)
- accepts_interfaces = (ICalendarable,)
+ __selectors__ = implements(ICalendarable)
need_navigation = False
content_type = 'text/calendar'
title = _('iCalendar')
@@ -114,8 +113,7 @@
Does apply to ICalendarable compatible entities
"""
__registerer__ = priority_registerer
- __selectors__ = (implement_interface,)
- accepts_interfaces = (ICalendarable,)
+ __selectors__ = implements(ICalendarable)
need_navigation = False
title = _('hCalendar')
#templatable = False
@@ -146,8 +144,7 @@
class OneMonthCal(EntityView):
"""At some point, this view will probably replace ampm calendars"""
__registerer__ = priority_registerer
- __selectors__ = (implement_interface, )
- accepts_interfaces = (ICalendarable,)
+ __selectors__ = implements(ICalendarable)
need_navigation = False
id = 'onemonthcal'
title = _('one month')
@@ -331,8 +328,7 @@
class OneWeekCal(EntityView):
"""At some point, this view will probably replace ampm calendars"""
__registerer__ = priority_registerer
- __selectors__ = (implement_interface, )
- accepts_interfaces = (ICalendarable,)
+ __selectors__ = implements(ICalendarable)
need_navigation = False
id = 'oneweekcal'
title = _('one week')