コード例 #1
0
ファイル: views.py プロジェクト: 3atmospheres/treeio
def integration_sync(request, response_format='html'):
    
    if request.POST and 'sync' in request.POST:
        user = request.user.get_profile()
        integration.sync(user)
        messages.add_message(request, messages.INFO, _("You have successfully updated Calendar"))
    
    return HttpResponseRedirect(reverse('events_integration_index'))
コード例 #2
0
ファイル: views.py プロジェクト: vovkd/treeio
def integration_sync(request, response_format='html'):

    if request.POST and 'sync' in request.POST:
        user = request.user.get_profile()
        integration.sync(user)
        messages.add_message(request, messages.INFO,
                             _("You have successfully updated Calendar"))

    return HttpResponseRedirect(reverse('events_integration_index'))
コード例 #3
0
def cron_integration():
    "Run integration"
    try:
        integration.sync()
    except Exception:
        pass