当前位置: 首页>>代码示例>>Python>>正文


Python Event.all方法代码示例

本文整理汇总了Python中event.models.Event.all方法的典型用法代码示例。如果您正苦于以下问题:Python Event.all方法的具体用法?Python Event.all怎么用?Python Event.all使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在event.models.Event的用法示例。


在下文中一共展示了Event.all方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: events_done

# 需要导入模块: from event.models import Event [as 别名]
# 或者: from event.models.Event import all [as 别名]
def events_done(request):
    events = Event.all().filter('progress =',100 ).order('-start_date')
        
    c = Context({'events':events,
                 'kind':'done',
                 'loginurl':LOGIN,
                 'cur_user':CURUSER,
                 'logouturl':LOGOUT,
                 'is_admin':users.is_current_user_admin(),
                 })
    return render_to_response( 'event_list.htm',c)
开发者ID:beachboysqq,项目名称:gansha,代码行数:13,代码来源:views.py

示例2: events_list

# 需要导入模块: from event.models import Event [as 别名]
# 或者: from event.models.Event import all [as 别名]
def events_list(request):
    events = Event.all().order('start_date')
        
    c = Context({
            'logouturl':LOGOUT,
            'loginurl':LOGIN,
            'cur_user':CURUSER,
            'is_admin':users.is_current_user_admin(),
            'events':events,
            'kind':'all',
            })
    return render_to_response( 'event_list.htm',c)
开发者ID:beachboysqq,项目名称:gansha,代码行数:14,代码来源:views.py

示例3: events_todo

# 需要导入模块: from event.models import Event [as 别名]
# 或者: from event.models.Event import all [as 别名]
def events_todo(request):
    events = Event.all().filter( 
        'start_date >',today() ).filter('is_done =',False ).order('start_date')
        
    c = Context({
                 'events':events,
                 'kind':'todo',
                 'loginurl':LOGIN,
                 'cur_user':CURUSER,
                 'logouturl':LOGOUT,
                 'is_admin':users.is_current_user_admin(),
                 })
    return render_to_response( 'event_list.htm',c)
开发者ID:beachboysqq,项目名称:gansha,代码行数:15,代码来源:views.py

示例4: event

# 需要导入模块: from event.models import Event [as 别名]
# 或者: from event.models.Event import all [as 别名]
def event(request):
    try:
        ekey = request.GET['event']
        # record the current event for further useage
    except KeyError:
        ekey = memcache.get('event')
        if not ekey:
            raise Http404
    
    event = Event.get(Key(ekey))
    memcache.set('event',event.key())

    # get sub event of this event
    se_list = Subevent.gql("where event = :1 order by start_date,end_date",event) 
    # check up wheather sub event is expired
    for se in se_list:
        if se.isexpired==False and se.end_date < today():
            se.isexpired = True
            se.put()
    # get host's history operation on this event
    history_li = History.all().filter('event =',event).order('-publish_time')
    # get blogs about this event
    blog_li = Blog.all().filter('event =',event )
    # get myevents
    myevents = Event.all()
    
    c = Context({
            'logouturl':LOGOUT,
            'loginurl':LOGIN,
            'cur_user':CURUSER,
            'is_admin':users.is_current_user_admin(),
            'event':event,
            'myevents':myevents,
            'se_list':se_list,
            'num_se':se_list.count(20),
            'history_li':history_li,
            'num_history_records':history_li.count(10),
            'blog_li':blog_li,
            'num_blogs':blog_li.count(100),
            })
    return render_to_response('event.htm',c)
开发者ID:beachboysqq,项目名称:gansha,代码行数:43,代码来源:views.py

示例5: get_events

# 需要导入模块: from event.models import Event [as 别名]
# 或者: from event.models.Event import all [as 别名]
def get_events():
    events = Event.all().order('-start_date')
    return events
开发者ID:beachboysqq,项目名称:gansha,代码行数:5,代码来源:control.py


注:本文中的event.models.Event.all方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。