Skip to content
Find file
Fetching contributors…
Cannot retrieve contributors at this time
69 lines (57 sloc) 1.99 KB
#!/usr/bin/env python
# coding=utf-8
import os
import re
import time
import datetime
import hashlib
import string
import random
from google.appengine.ext import webapp
from google.appengine.api import memcache
from google.appengine.ext import db
from google.appengine.ext.webapp import util
from google.appengine.ext.webapp import template
from v2ex.babel import Member
from v2ex.babel import Counter
from v2ex.babel import Section
from v2ex.babel import Node
from v2ex.babel import Topic
from v2ex.babel import Reply
from v2ex.babel import Note
from v2ex.babel import SYSTEM_VERSION
from import *
from import *
from v2ex.babel.da import *
from v2ex.babel.l10n import *
from v2ex.babel.ext.cookies import Cookies
class WorldClockHandler(webapp.RequestHandler):
def get(self):
site = GetSite()
member = CheckAuth(self)
template_values = {}
template_values['site'] = site
if member:
template_values['member'] = member
l10n = GetMessages(self, site, member)
template_values['l10n'] = l10n
template_values['page_title'] = site.title + u' › World Clock 世界时钟'
template_values['now'] =
path = os.path.join(os.path.dirname(__file__), 'tpl', 'desktop', 'time.html')
output = template.render(path, template_values)
class WeblukerHandler(webapp.RequestHandler):
def head(self):
def get(self):
def main():
application = webapp.WSGIApplication([
('/time/?', WorldClockHandler),
('/webluker-verif.html', WeblukerHandler)
if __name__ == '__main__':
Something went wrong with that request. Please try again.