示例#1
0
文件: views.py 项目: longzenvo/pactf
def default_context(request):
    """Return context needed for all CTFlex templates

    This context processor is included as the global context processor in
    `settings.py`; therefore, it should not be manually included.
    """
    return {
        'team': request.user.competitor.team if queries.is_competitor(request.user) else None,
        'contact_email': settings.CONTACT_EMAIL,
        'js_context': '{}',
        'incubating': settings.INCUBATING,
    }
示例#2
0
文件: views.py 项目: milesmcc/pactf
def default_context(request):
    """Return context needed for all CTFlex templates

    This context processor is included as the global context processor in
    `settings.py`; therefore, it should not be manually included.
    """
    return {
        'team': request.user.competitor.team if queries.is_competitor(request.user) else None,
        'contact_email': settings.CONTACT_EMAIL,
        'js_context': '{}',
        'incubating': settings.INCUBATING,
    }
示例#3
0
def mark_announcements_read(user):
    if queries.is_competitor(user):
        user.competitor.unread_announcements.clear()
示例#4
0
def mark_announcements_read(user):
    if queries.is_competitor(user):
        user.competitor.unread_announcements.clear()