Opened 10 years ago

Last modified 3 years ago

#3769 new enhancement

idea: consideration of option providers in addition to templates

Reported by: Jeff Hammel Owned by:
Priority: low Component: TracLegosScript
Severity: normal Keywords:
Cc: Trac Release: 0.11


option providers could be utilized to provide a set of options that tweaks part of the configuration. For instance, one option could be "email enabled trac" or "email disabled trac" and by toggling between these two, a set of configuration options could be enabled or disabled. (Its probably good to stop their functionality there, IMHO.) These would be applied on top of templates and could be easily presented via the web interface. Templates could be oblivious to these options or could specify them in some manner. They should be registered via setuptools entry points and would ideally utilize an interface structure, something like:

class OptionProvider(...):

    _options = { 'email enabled': # some ini file, list of [ (section, option, value) ], etc,
                 'email disabled': # ,}

    def options():
        """returns list of strings describing the options"""
        return self._options.keys()
    def configuration(option):
        return _options[option]

Attachments (0)

Change History (1)

comment:1 Changed 3 years ago by Ryan J Ollos

Owner: Jeff Hammel deleted

Modify Ticket

Change Properties
Set your email in Preferences
as new The ticket will remain with no owner.

Add Comment

E-mail address and name can be saved in the Preferences.

Note: See TracTickets for help on using tickets.