|
From: Theodore W. L. <tw...@sa...> - 2003-02-10 22:46:47
|
> -----Original Message----- > From: pyb...@li...=20 > [mailto:pyb...@li...] On=20 > Behalf Of Wari Wahab > Sent: Monday, February 10, 2003 3:13 AM > Cc: pyb...@li... > Subject: [Pyblosxom-devel] Problem in startup() >=20 >=20 > See the diff between=20 > http://roughingit.subtlehints.net/pyblosxom-dev/2002/08?flav=3Di > ndex and=20 > http://roughingit.subtlehints.net/pyblosxom/2002/08?flav=3Dindex >=20 > 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]): >=20 > You should get only one entry, but pyblosxom-dev lists all=20 > the entries=20 > from the start till end. >=20 > This happens because I calculated pi_mo, pi_yr, etc much later at the=20 > end of startup: > self.py['pi_yr'] =3D (len(path_info) > 0 and=20 > path_info.pop(0) or '') > self.py['pi_mo'] =3D (len(path_info) > 0 and=20 > path_info.pop(0) or '') > self.py['pi_da'] =3D (len(path_info) > 0 and=20 > path_info.pop(0) or '') >=20 > If your the fix eats up the 2002 as an entry match, pi_yr=20 > will never get=20 > anything. You have to change the way the path_info is=20 > processed. I was=20 > going to look into that, and as I said I was kinda lazy while doing=20 > other infrastructure stuff. I see the problem. I didn't try it on the index flavor -- probably = because I did it so long ago that I forgot about it until I tried to check it = in. =20 > 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=20 > or yr/mo/da=20 > combination > 2. Process the rest of the URL > 3. Use index.flavour as the flavour to use and a page to=20 > render(no need=20 > for flav=3Dflavour, though not missing entirely) > 4. If path or file does not exist, treat query as invalid Do I undestand right? You want to eliminate flav=3Dflavour processing in = favor of index.flavour in #3? So in 4. what should be the correct behaviour? Ted |