~julian-edwards/launchpad/publisher-config-ppa-schema-bug-734807

« back to all changes in this revision

Viewing changes to lib/lp/registry/browser/distribution.py

  • Committer: Julian Edwards
  • Date: 2011-03-17 12:35:03 UTC
  • Revision ID: julian.edwards@canonical.com-20110317123503-yojjp1r6u0evfp7e
Put the extra fields on the form and make the tests pass

Show diffs side-by-side

added added

removed removed

Lines of Context:
1108
1108
    It redirects to the main distroseries page after a successful edit.
1109
1109
    """
1110
1110
    schema = IPublisherConfig
1111
 
    field_names = ['root_dir', 'base_url', 'copy_base_url']
 
1111
    field_names = [
 
1112
        'root_dir', 'base_url', 'copy_base_url', 'ppa_root_dir',
 
1113
        'ppa_private_root_dir', 'ppa_base_url', 'ppa_private_base_url',
 
1114
        'ppa_signing_keys_root',
 
1115
        ]
1112
1116
 
1113
1117
    @property
1114
1118
    def label(self):
1147
1151
                distribution=self.context,
1148
1152
                root_dir=data['root_dir'],
1149
1153
                base_url=data['base_url'],
1150
 
                copy_base_url=data['copy_base_url'])
 
1154
                copy_base_url=data['copy_base_url'],
 
1155
                # The following fields are optional.
 
1156
                ppa_root_dir=data.get('ppa_root_dir'),
 
1157
                ppa_private_root_dir=data.get('ppa_private_root_dir'),
 
1158
                ppa_base_url=data.get('ppa_base_url'),
 
1159
                ppa_private_base_url=data.get('ppa_private_base_url'),
 
1160
                ppa_signing_keys_root=data.get('ppa_signing_keys_root')
 
1161
                )
1151
1162
        else:
1152
1163
            form.applyChanges(config, self.form_fields, data, self.adapters)
1153
1164