0

Google 애플리케이션 엔진으로 앱을 씁니다. 그것은 간단한 블로그 시스템입니다. 블로그 일부를 삭제하면 원하는대로 페이지가 새로 고쳐지지 않습니다. 그것은 여전히 ​​삭제 된 블로그를 제시합니다.하지만 그 후에 페이지를 새로 고치면 올바른 방식으로 나타납니다. 나는 그것이 캐시의 문제 였지만. 나는 serveral 시대 동안 그 일을 해왔다. 아무도 그것을 고칠 수있는 방법을 가르쳐 줄래? 매우 감사합니다.내 페이지가 최신 데이터를 표시하지 않는 이유

class BlogFront(BlogHandler): 
    def get(self): 
     val = self.request.get("newPost") 
     #get all the pages 
     posts = Post.all().order('-created') 
     #stop the cache in the browser 
     self.response.headers["Pragma"]="no-cache" 
     self.response.headers["Cache-Control"]="no-cache, no-store, must-revalidate, pre-check=0, post-check=0" 
     self.response.headers["Expires"]="Thu, 01 Dec 1994 16:00:00" 
     self.render('front.html', posts = posts) 

    def post(self): 
     #press the delete button 
     operatorRequest = self.request.get('Delete') 
     articleId = operatorRequest.split('|')[0] 
     operator = operatorRequest.split('|')[1] 
     key = db.Key.from_path('Post', int(articleId), parent=blog_key()) 
     post = db.get(key) 
     db.delete(post.key()) 
     self.redirect("/") 
+0

당신이 상쾌 원하는이 페이지가 브라우저 창에? 자신을 리프레시해야한다는 것을 어떻게 알 수 있습니까? –

답변

관련 문제