def path(self):
path = self._path()<EOL>statobj = os.stat(path)<EOL>ae = self.request.META.get('<STR_LIT>', '<STR_LIT>')<EOL>if re_accepts_gzip.search(ae) and getattr(settings, '<STR_LIT>', True):<EOL><INDENT>gzip_path = "<STR_LIT>".format(path=path, ext=self.EXT)<EOL>up_to_date = True<EOL>if not os.path.exists(gzip_path):<EOL><INDENT>up_to_date = False<EOL><DEDENT>else:<EOL><INDENT>gzip_statobj = os.stat(gzip_path)<EOL>if statobj.st_mtime > gzip_statobj.st_mtime:<EOL><INDENT>up_to_date = False<EOL><DEDENT><DEDENT>if not up_to_date:<EOL><INDENT>gzip_file(path, gzip_path)<EOL><DEDENT>path = gzip_path<EOL><DEDENT>return path<EOL>
Serve gzip file if client accept it.
Generate or update the gzip file if needed.