cubicweb/hooks/metadata.py
changeset 11767 432f87a63057
parent 11763 39df042f4ab4
child 11773 054a947b5415
equal deleted inserted replaced
11766:d8de1ac21f36 11767:432f87a63057
     1 # copyright 2003-2013 LOGILAB S.A. (Paris, FRANCE), all rights reserved.
     1 # copyright 2003-2016 LOGILAB S.A. (Paris, FRANCE), all rights reserved.
     2 # contact http://www.logilab.fr/ -- mailto:contact@logilab.fr
     2 # contact http://www.logilab.fr/ -- mailto:contact@logilab.fr
     3 #
     3 #
     4 # This file is part of CubicWeb.
     4 # This file is part of CubicWeb.
     5 #
     5 #
     6 # CubicWeb is free software: you can redistribute it and/or modify it under the
     6 # CubicWeb is free software: you can redistribute it and/or modify it under the
    15 #
    15 #
    16 # You should have received a copy of the GNU Lesser General Public License along
    16 # You should have received a copy of the GNU Lesser General Public License along
    17 # with CubicWeb.  If not, see <http://www.gnu.org/licenses/>.
    17 # with CubicWeb.  If not, see <http://www.gnu.org/licenses/>.
    18 """Core hooks: set generic metadata"""
    18 """Core hooks: set generic metadata"""
    19 
    19 
    20 __docformat__ = "restructuredtext en"
       
    21 
       
    22 from datetime import datetime
    20 from datetime import datetime
    23 from base64 import b64encode
       
    24 
    21 
    25 from pytz import utc
    22 from pytz import utc
    26 
    23 
    27 from cubicweb.predicates import is_instance
    24 from cubicweb.predicates import is_instance
    28 from cubicweb.server import hook
    25 from cubicweb.server import hook
    29 from cubicweb.server.edition import EditedEntity
       
    30 
    26 
    31 
    27 
    32 class MetaDataHook(hook.Hook):
    28 class MetaDataHook(hook.Hook):
    33     __abstract__ = True
    29     __abstract__ = True
    34     category = 'metadata'
    30     category = 'metadata'