Using network analysis, psychologists have already found the nontrivial correlation between personality and social network structure. Despite the large amount of empirical studies, theoretical analysis and formal models behind such relationship are still lacking. To bridge this gap, we propose a generative model for friendship networks based on personality traits. To the best of our knowledge, this is the first work to explicitly introduce the concept of personality and friendship development into a social network model, with supporting insights from social and personality psychology. We use the model to investigate the effect of two personality traits, extraversion and agreeableness, on network structure. Analytical and simulation results both concur with recent empirical evidence that extraversion and agreeableness are positively correlated with degree. Using this model, we show that the effect of personality on friendship development can amount to the effect of personality on friendship network structure.