def sync_keys(request): pk = request.POST.get('pk', None) if pk: try: login = Login.objects.get(pk=pk) login.sync(request.user) except Login.DoesNotExist: pass else: Login.sync_all(request.user) return redirect('ssheepdog.views.view_access_summary')
def sync_all(): Login.sync_all()