Modify

Opened 8 years ago

Last modified 16 months ago

#3769 new enhancement

idea: consideration of option providers in addition to templates

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

Description

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 16 months ago by rjollos

  • Owner k0s deleted

Add Comment

Modify Ticket

Action
as new The ticket will remain with no owner.
Author


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

 
Note: See TracTickets for help on using tickets.