cannot interpolate default values from main

Bug #953109 reported by Hampton Paulk
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
django-configglue
New
Undecided
Unassigned

Bug Description

if in the schema you define an option with a default value that would fall under the __main__ section, you are unable to interpolate those values to another section using the default value.
If you define an option with a default value you are able to use it within the same named section.

#schema.py
class FooSchema(DjangoSchema)
    gump = schema.StringOption(default='forrest')

    class shrimp(schema.Section):
        captain = schema.StringOption()

#main.cfg
[__main__]

[shrimp]
captain = %(gump)s

The above example will not work. If you were to place a static gump = 'forrest' in to main it would work, or if you were to place the option in the shrimp section the default value would work with interpolation.

I feel that if you can interpolate from the main section for any value in the cfg, you should also be able to use the default value from the main section as well.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.