Show
Ignore:
Timestamp:
05/02/08 16:47:16 (23 months ago)
Author:
JensDiemer
Message:

update preferences:

  • move the preferences form from the plugin module into the plugin config modul
  • a plugin must not use try...except to get the preferences
  • update all modules around the plugin install/deinstall etc.
  • detect_page used the system_settings "index_page" value (setup a other default index page works!)
Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/pylucid/PyLucid/plugins_internal/search/search_cfg.py

    r1479 r1551  
    1313 
    1414#_____________________________________________________________________________ 
     15# preferences 
     16 
     17from django import newforms as forms 
     18from django.utils.translation import ugettext as _ 
     19 
     20class PreferencesForm(forms.Form): 
     21    min_term_len = forms.IntegerField( 
     22        help_text=_("Min length of a search term"), 
     23        initial=3, min_value=1 
     24    ) 
     25    max_term_len = forms.IntegerField( 
     26        help_text=_("Max length of a search term"), 
     27        initial=50, min_value=1, max_value=200 
     28    ) 
     29    max_results = forms.IntegerField( 
     30        help_text=_("Number of the paged for the result page"), 
     31        initial=20, min_value=1, max_value=200 
     32    ) 
     33    text_cutout_len = forms.IntegerField( 
     34        help_text=_("The length of the text-hit-cutouts"), 
     35        initial=50, min_value=1, max_value=200 
     36    ) 
     37    text_cutout_lines = forms.IntegerField( 
     38        help_text=_("Max. cutout lines for every search term"), 
     39        initial=5, min_value=1, max_value=20 
     40    ) 
     41 
     42#_____________________________________________________________________________ 
    1543# plugin administration data 
    1644