# has to be imported
from snippets.models import Snippet
from snippets.serializers import SnippetSerializer
from rest_framework.renderers import JSONRenderer
from rest_framework.parsers import JSONParser

snippet = Snippet(code='foo =bar\n')
snippet.save()

snippet = Snippet(code='print "hello world"\n')
snippet.save()

serializer = SnippetSerializer(snippet);
print(serializer.data)

content = JSONRenderer().render(serializer.data)
print(content)  # will render a string

cb173c07f24441262c1f1e75c1adff9437957ae5
<mask token>

<mask token>
snippet.save()
<mask token>
snippet.save()
<mask token>
print(serializer.data)
<mask token>
print(content)

<mask token>
snippet = Snippet(code='foo =bar\n')
snippet.save()
snippet = Snippet(code='print "hello world"\n')
snippet.save()
serializer = SnippetSerializer(snippet)
print(serializer.data)
content = JSONRenderer().render(serializer.data)
print(content)

from snippets.models import Snippet
from snippets.serializers import SnippetSerializer
from rest_framework.renderers import JSONRenderer
from rest_framework.parsers import JSONParser
snippet = Snippet(code='foo =bar\n')
snippet.save()
snippet = Snippet(code='print "hello world"\n')
snippet.save()
serializer = SnippetSerializer(snippet)
print(serializer.data)
content = JSONRenderer().render(serializer.data)
print(content)

# has to be imported
from snippets.models import Snippet
from snippets.serializers import SnippetSerializer
from rest_framework.renderers import JSONRenderer
from rest_framework.parsers import JSONParser

snippet = Snippet(code='foo =bar\n')
snippet.save()

snippet = Snippet(code='print "hello world"\n')
snippet.save()

serializer = SnippetSerializer(snippet);
print(serializer.data)

content = JSONRenderer().render(serializer.data)
print(content)  # will render a string
