Changeset 1551 for trunk/pylucid/PyLucid/models.py
- Timestamp:
- 05/02/08 16:47:16 (23 months ago)
- Files:
-
- 1 modified
-
trunk/pylucid/PyLucid/models.py (modified) (7 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/pylucid/PyLucid/models.py
r1548 r1551 32 32 from PyLucid.tools import crypt 33 33 from PyLucid.system.utils import get_uri_base 34 from PyLucid.system.plugin_import import get_plugin_ module34 from PyLucid.system.plugin_import import get_plugin_config, get_plugin_version 35 35 36 36 #from PyLucid.db.cache import delete_page_cache … … 234 234 auto_shortcuts = True 235 235 else: 236 print ">>>", preferences237 236 auto_shortcuts = preferences["auto_shortcuts"] 238 237 … … 508 507 # Get the name of the plugin, if __file__ used 509 508 plugin_name = os.path.splitext(os.path.basename(plugin_name))[0] 510 print "plugin name: '%s'" % plugin_name509 #print "plugin name: '%s'" % plugin_name 511 510 512 511 if plugin_name in preference_cache: … … 541 540 ) 542 541 542 #__________________________________________________________________________ 543 # spezial methods 544 543 545 def init_pref_form(self, pref_form): 544 546 """ … … 550 552 self.set_pref_data_string(init_dict) 551 553 554 #__________________________________________________________________________ 555 # spezial set methods 556 552 557 def set_pref_data_string(self, data_dict): 553 558 """ … … 556 561 preference_cache[self.plugin_name] = data_dict 557 562 self.pref_data_string = pformat(data_dict) 563 564 #__________________________________________________________________________ 565 # spezial get methods 558 566 559 567 def get_preferences(self): … … 570 578 initial information into the help text and return the form. 571 579 """ 572 plugin_ module = get_plugin_module(580 plugin_config = get_plugin_config( 573 581 self.package_name, self.plugin_name, debug 574 582 ) 575 form = getattr(plugin_ module, "PreferencesForm")583 form = getattr(plugin_config, "PreferencesForm") 576 584 setup_help_text(form) 577 585 return form 586 587 def get_version_string(self, debug=False): 588 """ 589 Returned the version string from the plugin module 590 """ 591 return get_plugin_version(self.package_name, self.plugin_name, debug) 592 593 #-------------------------------------------------------------------------- 578 594 579 595 def save(self):