def create_post(self, filename): post = Post() post.title = self.title post.author = self.request.user post.original_file = filename post.save()