Define a key order for document and org app
This way the export order will be constant, even if we add more model
properties later on.
Patch by: Sverre Rabbelier
--- a/app/soc/views/models/document.py Thu Mar 12 21:38:07 2009 +0000
+++ b/app/soc/views/models/document.py Thu Mar 12 21:38:40 2009 +0000
@@ -69,6 +69,9 @@
new_params['export_extension'] = '.html'
new_params['export_function'] = lambda x: (x.content, x.link_id)
new_params['delete_redirect'] = '/'
+ new_params['list_key_order'] = [
+ 'link_id', 'scope_path', 'name', 'short_name', 'title',
+ 'content', 'prefix','read_access','write_access']
new_params['no_create_raw'] = True
new_params['no_create_with_scope'] = True
--- a/app/soc/views/models/org_app.py Thu Mar 12 21:38:07 2009 +0000
+++ b/app/soc/views/models/org_app.py Thu Mar 12 21:38:40 2009 +0000
@@ -85,6 +85,14 @@
new_params['sidebar_grouping'] = 'Organizations'
+ new_params['list_key_order'] = [
+ 'link_id', 'scope_path', 'name', 'home_page', 'email',
+ 'description', 'why_applying','pub_mailing_list','irc_channel',
+ 'member_criteria', 'prior_participation', 'prior_application',
+ 'license_name', 'ideas', 'dev_mailing_list', 'contrib_template',
+ 'contrib_disappears', 'member_disappears', 'encourage_contribs',
+ 'continued_contribs']
+
patterns = [(r'^%(url_name)s/(?P<access_type>apply)/%(scope)s$',
'soc.views.models.%(module_name)s.create',
'Create an %(name_plural)s'),