Пример #1
0
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 Contacts"))

    return HttpResponseRedirect(reverse("identities_integration_index"))
Пример #2
0
def cron_integration():
    "Run integration"
    try:
        integration.sync()
    except:
        pass