|
From: Wari W. <wa...@ho...> - 2003-02-10 11:13:20
|
See the diff between http://roughingit.subtlehints.net/pyblosxom-dev/2002/08?flav=index and http://roughingit.subtlehints.net/pyblosxom/2002/08?flav=index The pyblosxom-dev uses while re.match(r'^[a-zA-Z0-9]\w*', path_info[0]): and pyblosxom: while re.match(r'^[a-zA-Z]\w*', path_info[0]): You should get only one entry, but pyblosxom-dev lists all the entries from the start till end. This happens because I calculated pi_mo, pi_yr, etc much later at the end of startup: self.py['pi_yr'] = (len(path_info) > 0 and path_info.pop(0) or '') self.py['pi_mo'] = (len(path_info) > 0 and path_info.pop(0) or '') self.py['pi_da'] = (len(path_info) > 0 and path_info.pop(0) or '') If your the fix eats up the 2002 as an entry match, pi_yr will never get anything. You have to change the way the path_info is processed. I was going to look into that, and as I said I was kinda lazy while doing other infrastructure stuff. Anyway, here's a list of that I wanted to do in startup() 1. Look for (yr/mo/da) which must appear in either yr, yr/mo or yr/mo/da combination 2. Process the rest of the URL 3. Use index.flavour as the flavour to use and a page to render(no need for flav=flavour, though not missing entirely) 4. If path or file does not exist, treat query as invalid Which reminds me, lucene.py should tell the user that the search is invalid if no entries are found too instead of letting people see the default page being rendered, and the user have no clue that their search term did not return any results. Theodore W. Leung wrote: >Please do show me... > > |