[Pywikipedia-l] Category redirect: question

Russell Blau russblau at imapmail.org
Tue Jan 13 22:09:03 UTC 2009


I've been working on implementing the category redirect detection suggested 
by Lars Aronsson 
(https://sourceforge.net/tracker/?func=detail&atid=603141&aid=1722782&group_id=93107), 
but I have a question for other developers.  A category redirect is 
implemented as a "soft redirect"; that is, a template is placed on the page 
marking it as a redirect, but it does not use the #REDIRECT magic word of 
the MediaWiki software, so the server doesn't treat it as a redirect.  As 
proposed, a category page (p) that contains a "soft" category redirect would 
return True both to p.isRedirectPage() and to p.is_category_redirect(); the 
only way to tell hard redirects apart from soft redirects would be to do 
something like:

if p.isRedirectPage() and not p.is_category_redirect():
    handle_hard_redirects_only()

The question is, if pages that are not hard redirects return True to 
p.isRedirectPage(), will this break anything else?

Russ




More information about the Pywikipedia-l mailing list