Worked on contenttype filtering

1) Moved the contenttype_groups structure under config, changeset: https://bitbucket.org/sinha/moin2/changeset/8462764f59d2

ii) Replaced the contenttype form by a flatland form, codereview: http://codereview.appspot.com/4696048

Issues:

i) When the method is "GET", then i am sending the form with default_values(), which is taking False for checkboxes, but i want it to be True(checked), such that on default all of them is checked.

see http://readthedocs.org/docs/flatland/en/latest/markup.html there are some examples on that page

ii) How can i automate this, I mean currently i have written all the input fields inside that ContenttypeFilterForm class, isn't there any way to read the group names from that CONTENTTYPE_GROUPS and put them as input for the forms ? I mean can we use list/dict kind of data structure inside a form.

iii) I have created a new macro in forms.html, reason(i) i will pass extra params there (the mime types belonging to groups) and reason(ii) better styling.

And also i will be traveling today back to home, so no work on 14th and 15th

comment about sorting

thats why you want to use sorted

   1 diff -r 74b14c8adc24 MoinMoin/apps/frontend/views.py
   2 --- a/MoinMoin/apps/frontend/views.py   Fri Jul 15 00:23:52 2011 +0200
   3 +++ b/MoinMoin/apps/frontend/views.py   Fri Jul 15 21:51:38 2011 +0200
   4 @@ -523,7 +523,7 @@
   5      initials = list(set(initials))
   6      initials = sorted(initials)
   7      detailed_index = item.get_detailed_index(index)
   8 -    detailed_index = sorted(detailed_index)
   9 +    detailed_index = sorted(detailed_index, key=lambda name: name[0].lower()) 
  10  
  11      item_name = request.values.get('item_name', '') # actions menu puts it into qs
  12      return render_template('global_index.html',

comment about index / index2

Please read discussion about unifying of index and index2 at MoinMoinChat/Logs/moin-dev/2011-07-16 and tell us what you think about that.

MoinMoin: AkashSinha/Gsoc2011Diary/2011-07-13 (last edited 2011-07-16 18:51:46 by ReimarBauer)