from .models import User

def get_sessionuserid(request):
  session_userid = request.session['_user_'] or 0
  if not session_userid:
    request.flush()
    return HttpResponseRedirect(reverse('Start:login'))

  print('session_userid:',session_userid)

  user = User.objects.get(pk=session_userid)
  return user


