web/__init__.py
changeset 0 b97547f5f1fa
child 1181 620ec8e6ae19
equal deleted inserted replaced
-1:000000000000 0:b97547f5f1fa
       
     1 """CubicWeb web client core. You'll need a apache-modpython or twisted
       
     2 publisher to get a full CubicWeb web application
       
     3 
       
     4 
       
     5 :organization: Logilab
       
     6 :copyright: 2001-2008 LOGILAB S.A. (Paris, FRANCE), all rights reserved.
       
     7 :contact: http://www.logilab.fr/ -- mailto:contact@logilab.fr
       
     8 """
       
     9 __docformat__ = "restructuredtext en"
       
    10 
       
    11 from cubicweb.web._exceptions import *    
       
    12 
       
    13 _ = unicode
       
    14 
       
    15 INTERNAL_FIELD_VALUE = '__cubicweb_internal_field__'
       
    16 
       
    17 
       
    18 class stdmsgs(object):
       
    19     """standard ui message (in a class for bw compat)"""
       
    20     BUTTON_OK     = _('button_ok')
       
    21     BUTTON_APPLY  = _('button_apply')
       
    22     BUTTON_CANCEL = _('button_cancel')
       
    23     BUTTON_DELETE = _('button_delete')
       
    24     YES = _('yes')
       
    25     NO  = _('no')
       
    26 
       
    27 
       
    28 def eid_param(name, eid):
       
    29     assert eid is not None
       
    30     if eid is None:
       
    31         eid = ''
       
    32     return '%s:%s' % (name, eid)
       
    33 
       
    34 
       
    35 from logging import getLogger
       
    36 LOGGER = getLogger('cubicweb.web')
       
    37 
       
    38 FACETTES = set()
       
    39 
       
    40 
       
    41 ## FACETTES = set( (
       
    42 ##     # (relation, role, target's attribute)
       
    43 ##     ('created_by', 'subject', 'login'),
       
    44 ##     ('in_group', 'subject', 'name'),
       
    45 ##     ('in_state', 'subject', 'name'),
       
    46 ##     ))