def index(req, ln=CFG_SITE_LANG): """ Main BibFormat administration page. Displays a warning if we find out that etc/biformat dir is not writable by us (as most opeation of BibFormat must write in this directory). @param req: the request object @param ln: language @return: a web page """ warnings = [] if not bibformatadminlib.can_write_etc_bibformat_dir(): warnings.append(("WRN_BIBFORMAT_CANNOT_WRITE_IN_ETC_BIBFORMAT")) ln = wash_language(ln) _ = gettext_set_language(ln) # Check if user is authorized to administer # If not, still display page but offer to log in try: uid = getUid(req) except MySQLdb.Error, e: return error_page(req)
def index(req, ln=CFG_SITE_LANG): """ Main BibFormat administration page. Displays a warning if we find out that etc/biformat dir is not writable by us (as most opeation of BibFormat must write in this directory). @param req: the request object @param ln: language @return: a web page """ warnings = [] ln = wash_language(ln) _ = gettext_set_language(ln) if not bibformatadminlib.can_write_etc_bibformat_dir(): try: raise InvenioBibFormatWarning(_('Cannot write in etc/bibformat dir of your Invenio installation. Check directory permission.')) except InvenioBibFormatWarning, exc: register_exception(stream='warning', req=req) warnings.append(exc.message)
def index(req, ln=CFG_SITE_LANG): """ Main BibFormat administration page. Displays a warning if we find out that etc/biformat dir is not writable by us (as most opeation of BibFormat must write in this directory). @param req: the request object @param ln: language @return: a web page """ warnings = [] ln = wash_language(ln) _ = gettext_set_language(ln) if not bibformatadminlib.can_write_etc_bibformat_dir(): try: raise InvenioBibFormatWarning( _('Cannot write in etc/bibformat dir of your Invenio installation. Check directory permission.' )) except InvenioBibFormatWarning, exc: register_exception(stream='warning', req=req) warnings.append(exc.message)