Example #1
0
 def get(self):
     try:
         self.write('如果出现错误请尝试刷新本页。')
         has_user = User.check_has_user()
         if has_user:
             self.write('博客已经成功安装了,你可以直接 <a href="/admin/flushdata">清空网站数据</a>')
         else:
             self.write('博客数据库已经建立,现在就去 <a href="/admin/">设置一个管理员帐号</a>')
     except:
         MyData.creat_table()
         self.write('博客已经成功安装了,现在就去 <a href="/admin/">设置一个管理员帐号</a>')
Example #2
0
 def get(self):
     try:
         self.write('如果出现错误请尝试刷新本页。')
         has_user = User.check_has_user()
         if has_user:
             self.write('博客已经成功安装了,你可以直接 <a href="/admin/flushdata">清空网站数据</a>')
         else:
             self.write('博客数据库已经建立,现在就去 <a href="/admin/">设置一个管理员帐号</a>')
     except:
         MyData.creat_table()
         self.write('博客已经成功安装了,现在就去 <a href="/admin/">设置一个管理员帐号</a>')
Example #3
0
    def get(self):
        act = self.get_argument("act", "")
        if act == "flush":
            MyData.flush_all_data()
            clear_all_cache()
            self.redirect("/admin/flushdata")
            return
        elif act == "flushcache":
            clear_all_cache()
            self.redirect("/admin/flushdata")
            return

        self.echo("admin_flushdata.html", {"title": "清空缓存/数据"}, layout="_layout_admin.html")
Example #4
0
 def get(self):
     act = self.get_argument("act",'')
     if act == 'flush':
         MyData.flush_all_data()
         clear_all_cache()
         self.redirect('/admin/flushdata')
         return
     elif act == 'flushcache':
         clear_all_cache()
         self.redirect('/admin/flushdata')
         return
     
     self.echo('admin_flushdata.html', {
         'title': "清空缓存/数据",
     },layout='_layout_admin.html')
Example #5
0
    def get(self):
        act = self.get_argument("act",'')
        if act == 'flush':
            MyData.flush_all_data()
            clear_all_cache()
            self.redirect('/admin/flushdata')
            return
        elif act == 'flushcache':
            clear_all_cache()
            self.redirect('/admin/flushdata')
            return

        self.echo('admin_flushdata.html', {
            'title': "清空缓存/数据",
        },layout='_layout_admin.html')