old_contents: from django.db.models import F
  from django.utils import timezone
  from users.tasks import get_courses
  
  __author__ = 'tmehta'
  
  from users.models import UserProfile
  
  for user in UserProfile.objects.filter(last_updated__gt=F('user__last_joined')):
      get_courses(user.user_id)
      user.last_updated = timezone.now()
      user.save()
  
new_contents: from django.db.models import F
  from django.utils import timezone
  from users.tasks import get_courses
  
  __author__ = 'tmehta'
  
  from users.models import UserProfile
  
  for user in UserProfile.objects.filter(last_updated__gt=F('user__last_login')):
      get_courses(user.user_id)
      user.last_updated = timezone.now()
      user.save()
  
subject: Fix last_login