Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
serialize post
from import Post
from import PostSerializer
post = Post.objects.create(title='First post', text='This is a first post')
# {'pk': '4670511f-4a03-455e-a160-18c396fa743d', 'title': 'First post', 'text': 'This is a first post', 'tags': [], 'author': None, 'image': None}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment