Worked on the alphabetic listing for global index, having blockers

Blocker 1) I am getting error in building the url for unicode letters in jinja2, when i try to do this url_for('frontend.index', startsWith=letter) , i get this Build Error http://paste.pocoo.org/show/425630/

But when i do this url_for('frontend.index', item_name='', startsWith=letter) , i get no error, i mean as the regex for index page is written as " frontend.route('/+index')" in views.py, so why do i need to include this item_name='', in that url_for function ?

this is related to http://hg.moinmo.in/moin/2.0/file/7a81ff51008a/MoinMoin/apps/frontend/views.py#l510 and needs to be solved later

And moreover when this thing work, ( by putting this item_name='' ) i get url like this "+index/?startsWith=letter" , but i need it to be as as +index?startsWith=letter ( no slashes in between)

please use post, there is no user input required or is it? Also you can use it as +index/startswith/letter. You did something similiar already with the counter. (no mixed cases please)

Blocker(Issue) 2) So as in above if i directly feed that unicode letter to this url_for function it automatically encodes it in the url thus generated, so no need to do extra work on encoding here ( currently i have used it for few russians/chinese item names, it seems to be working).

I need to clear this Blocker 1, to move towards the next step.

And one more thing, i am fetching the list of letters in that flat_index function itself http://paste.pocoo.org/show/425636/, and returning it along with the index, so now we are getting a tuple as return type, So i guess this is going to affect the tests and usage of this function elsewhere, so should i create a new function say global_index rather than using this flat_index ?

Yes please add a separate function to get the letters, feed flat_index into it and return a sorted list(set()). And write a unittest for it.

messages

please use subsections on such a page

MoinMoin: AkashSinha/Gsoc2011Diary/2011-06-30 (last edited 2011-07-01 08:56:58 by ReimarBauer)