def user_requested_access(user):
 user = CourseCreator.objects.get(user=user)
 if (user.state != CourseCreator.GRANTED):
  user.state = CourseCreator.PENDING
  user.save()

def user_requested_access ( user ) : user = CourseCreator . objects . get ( user = user ) if ( user . state != CourseCreator . GRANTED ) : user . state = CourseCreator . PENDING user . save ( )
user has requested course creator access .