Worked on paging code and also on contenttype filtering

history paging code moved under util, now this function could be used from anywhere else for paging purpose. Changeset: https://bitbucket.org/sinha/moin2/changeset/b9f0ba2ba779

Edited the contenttype filtering at flat_index function, now contenttypes without the encoding will also be filtered and moreover items with unknown contenttypes will be shown directly without applying any filter.

Codereview: http://codereview.appspot.com/4813050

Currently to handle the items without encoding, i have appended more contenttypes in that list by removing the encoding, so now we will have "text/plain;charset=utf8" and "text/plain" both in that contenttype_list and we could do the check over them.

One other way to implement this could be that, in original list of contenttypes i remove the encoding part and also during filter when i check if a contenttype exist in the list, that time i will apply some remove_encoding() function which removes the encoding from item's contenttype (if present) and thus all the checks will be performed without the presence of encodings.

Please tell me which approach fits in current scenario.

comment

The problem is that we have not on uploading encoding information. The third option is to find out how you can get the encoding of the uploaded stuff and add it to meta. The encoding information is for displaying the content important but not for creating a list of the items in index. We need the contenttype with encoding. So removing it from meta is not the wanted solution.

MoinMoin: AkashSinha/Gsoc2011Diary/2011-07-25 (last edited 2011-07-26 06:19:11 by ReimarBauer)