15 lines
405 B
Python
15 lines
405 B
Python
|
"""REST serializers for pi simulations."""
|
||
|
from rest_framework import serializers
|
||
|
|
||
|
from pi.models import PiLog
|
||
|
|
||
|
|
||
|
class PiLogSerializer(serializers.ModelSerializer):
|
||
|
"""Pi simulation log entry serializer for the REST API."""
|
||
|
|
||
|
class Meta:
|
||
|
"""Meta options."""
|
||
|
|
||
|
model = PiLog
|
||
|
fields = ('id', 'simulation_x', 'simulation_y', 'total_count', 'total_count_inside', 'value', 'hit')
|