root/trunk/pylucid_project/PyLucid/plugins_internal/find_and_replace/find_and_replace_cfg.py

Revision 1719, 1.6 kB (checked in by JensDiemer, 4 months ago)

change "from django import newforms as forms" to "from django import forms": http://code.djangoproject.com/wiki/BackwardsIncompatibleChanges#Movednewformstoforms

  • Property svn:eol-style set to LF
Line 
1# -*- coding: utf-8 -*-
2
3from django import forms
4from django.utils.translation import gettext_lazy as _
5
6#_____________________________________________________________________________
7# meta information
8
9__author__      = "Jens Diemer"
10__url__         = "http://www.PyLucid.org"
11__description__ = "Find & replace content in all pages/templates/shylesheets."
12__long_description__ = """
13A simple find & replace plugin for all pages/templates/shylesheets content.
14You can easy change e.g. a URL in every page content or correct a misspelled
15word everywhere. Also useable to change CSS colors everywhere.
16
17Note: This plugin can only administrator used! You find the plugin in the
18submenu.
19"""
20
21#_____________________________________________________________________________
22# preferences
23
24class PreferencesForm(forms.Form):
25    min_term_len = forms.IntegerField(
26        help_text=_("Min length of a search term"),
27        initial=2, min_value=1
28    )
29    max_term_len = forms.IntegerField(
30        help_text=_("Max length of a search term"),
31        initial=150, min_value=1, max_value=500
32    )
33
34#_____________________________________________________________________________
35# plugin administration data
36
37plugin_manager_data = {
38    "find_and_replace" : {
39        "must_login"    : True,
40        "must_admin"    : True,
41        "admin_sub_menu": {
42            "section"       : _("page admin"),
43            "title"         : _("find/replace"),
44            "help_text"     : _(
45                "Find and replace strings in page/stylesheets/template content."
46            ),
47            "open_in_window": False,
48            "weight" : 5,
49        },
50    },
51}
Note: See TracBrowser for help on using the browser.