fix backref error on Post model
reorganize the user code