Show
Ignore:
Timestamp:
04/30/08 13:35:20 (7 months ago)
Author:
JensDiemer
Message:

Experimental new Preferences!

  • New editor used the newforms models in the plugin class
  • Doesn't realy use the preferences (in search and find_and_replace) only display it
  • the system_settings doesn't used, too. Only for display the data.
  • Not ready in all cases
  • there can exist some print debug!
Files:
1 modified

Legend:

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

    r1418 r1544  
    4949 
    5050 
     51class PreferencesForm(forms.Form): 
     52    min_term_len = forms.IntegerField( 
     53        help_text="Min length of a search term", 
     54        initial=3, min_value=1 
     55    ) 
     56    max_term_len = forms.IntegerField( 
     57        help_text="Max length of a search term", 
     58        initial=50, min_value=1, max_value=200 
     59    ) 
     60    max_results = forms.IntegerField( 
     61        help_text="Number of the paged for the result page", 
     62        initial=20, min_value=1, max_value=200 
     63    ) 
     64    text_cutout_len = forms.IntegerField( 
     65        help_text="The length of the text-hit-cutouts", 
     66        initial=50, min_value=1, max_value=200 
     67    ) 
     68    text_cutout_lines = forms.IntegerField( 
     69        help_text="Max. cutout lines for every search term", 
     70        initial=5, min_value=1, max_value=20 
     71    ) 
     72 
    5173 
    5274class SearchForm(forms.Form): 
     
    6385        Insert a empty search form into the page. 
    6486        """ 
     87        self.page_msg("Preferences:", self.preferences) 
    6588        search_form = SearchForm() 
    6689        context = {