Changeset 1640

Show
Ignore:
Timestamp:
06/13/08 19:18:23 (21 months ago)
Author:
JensDiemer
Message:

bugfix/update for new plugin manager api

Location:
trunk/pylucid/PyLucid
Files:
3 modified

Legend:

Unmodified
Added
Removed
  • trunk/pylucid/PyLucid/install/install.py

    r1627 r1640  
    3131    DROP_TABLES = ( 
    3232#        "PyLucid_pagearchiv", 
    33 #        "PyLucid_plugin", 
     33        "PyLucid_plugin", 
    3434        "PyLucid_preference", 
    3535        "PyLucid_preference2", 
     
    121121install_modules_template = """ 
    122122{% extends "install_base.html" %} 
    123 {% block content %} 
     123{% block pre_page_msg_content %} 
    124124<h1>Install all internal plugins:</h1> 
    125 <pre>{{ output|escape }}</pre> 
    126125{% endblock %} 
    127126""" 
    128127class InstallPlugins(BaseInstall): 
    129128    def view(self): 
    130         output = [] 
    131129        from PyLucid.system.plugin_manager import auto_install_plugins 
    132130 
    133         self._redirect_execute(auto_install_plugins, (self.request.debug)) 
     131        auto_install_plugins( 
     132            self.request.debug, self.page_msg, verbosity = 1 
     133        ) 
    134134 
    135135        return self._render(install_modules_template) 
  • trunk/pylucid/PyLucid/system/plugin_manager.py

    r1634 r1640  
    303303 
    304304    for plugin_name in plugin_list: 
    305         if verbosity>1: 
     305        if verbosity: 
    306306            msg= "\n\ninstall '%s' plugin: *** %s ***\n" % ( 
    307307                path_cfg["type"], plugin_name 
    308308            ) 
    309             page_msg(msg) 
     309            page_msg.black(msg) 
    310310 
    311311        try: 
    312             install_plugin( 
     312            plugin = install_plugin( 
    313313                package_name, plugin_name, page_msg, verbosity, active=True 
    314314            ) 
     
    320320            continue 
    321321 
    322         if verbosity>1: 
    323             page_msg("OK, plugins installed.") 
    324  
    325  
    326  
    327  
    328  
    329  
    330  
     322        if verbosity: 
     323            page_msg.green("OK, plugin ID %s installed." % plugin.id) 
     324 
     325 
     326 
     327 
     328 
     329 
     330 
  • trunk/pylucid/PyLucid/templates_PyLucid/install_base.html

    r1627 r1640  
    2929<h3 class="header"><a href="http://www.pylucid.org">PyLucid</a> v{{ version }} - setup@<a href="/" title="{% trans 'goto your PyLucid CMS page' %}">{{ request.META.HTTP_HOST }}</a></h3> 
    3030{% if not no_menu_link %}<p><a href="{% url PyLucid.install.index.menu . %}">&#xAB; {% trans 'back to menu' %}</a></p>{% endif %} 
     31{% block pre_page_msg_content %}{% endblock %} 
    3132<!-- page_messages --> 
    3233