本文整理汇总了Python中models.Event.get_approved_list_with_multiday方法的典型用法代码示例。如果您正苦于以下问题:Python Event.get_approved_list_with_multiday方法的具体用法?Python Event.get_approved_list_with_multiday怎么用?Python Event.get_approved_list_with_multiday使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类models.Event
的用法示例。
在下文中一共展示了Event.get_approved_list_with_multiday方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: get
# 需要导入模块: from models import Event [as 别名]
# 或者: from models.Event import get_approved_list_with_multiday [as 别名]
def get(self):
user = users.get_current_user()
if user:
logout_url = users.create_logout_url('/')
else:
login_url = users.create_login_url('/')
today = local_today()
show_all_nav = user
events = Event.get_approved_list_with_multiday()
tomorrow = today + timedelta(days=1)
whichbase = 'base.html'
if self.request.get('base'):
whichbase = self.request.get('base') + '.html'
self.response.out.write(template.render('templates/approved.html', locals()))
示例2: get
# 需要导入模块: from models import Event [as 别名]
# 或者: from models.Event import get_approved_list_with_multiday [as 别名]
def get(self):
user = users.get_current_user()
if user:
logout_url = users.create_logout_url("/")
else:
login_url = users.create_login_url("/")
today = local_today()
show_all_nav = user
events = Event.get_approved_list_with_multiday()
tomorrow = today + timedelta(days=1)
# this is not the permanent answer but just for now
cdn = "http://cdn.hackerdojo.com"
whichbase = "../hd-ui/templates/base.html"
if self.request.get("base"):
whichbase = self.request.get("base") + ".html"
self.response.out.write(template.render("templates/approved.html", locals()))