Next / Previous / Contents / TCC Help System / NM Tech homepage

31. AccessSummary.__pwdFilter(): Filter out password-protected pages

This method checks a PageGet to see if it is a password-protected page. A PageGet is considered password-protected if its .username field is not a single hyphen.

webstats.py
# - - -   A c c e s s S u m m a r y . _ _ p w d F i l t e r

    def __pwdFilter ( self, pageGet ):
        '''Filter out password-protected pages.

          [ pageGet is a PageGet instance ->
              if pageGet pertains to a page that is not
              password-protected ->
                return True
              else -> return False ]
        '''
        return pageGet.username == '-'