def _add_user(user, state):
 if ((not user.is_staff) and (CourseCreator.objects.filter(user=user).count() == 0)):
  entry = CourseCreator(user=user, state=state)
  entry.save()
  return True
 return False

def _add_user ( user , state ) : if ( ( not user . is_staff ) and ( CourseCreator . objects . filter ( user = user ) . count ( ) == 0 ) ) : entry = CourseCreator ( user = user , state = state ) entry . save ( ) return True return False
adds a user to the course creator table with the specified state .