mirror of
				https://github.com/ae-utbm/sith.git
				synced 2025-10-31 09:03:06 +00:00 
			
		
		
		
	
		
			
				
	
	
		
			16 lines
		
	
	
		
			386 B
		
	
	
	
		
			Python
		
	
	
	
	
	
			
		
		
	
	
			16 lines
		
	
	
		
			386 B
		
	
	
	
		
			Python
		
	
	
	
	
	
| from rest_framework import serializers
 | |
| from counter.models import Counter
 | |
| 
 | |
| 
 | |
| class Counter(serializers.ModelSerializer):
 | |
| 
 | |
|     is_open = serializers.BooleanField(read_only=True)
 | |
|     barman_list = serializers.ListField(
 | |
|             child = serializers.IntegerField()
 | |
|             )
 | |
| 
 | |
|     class Meta:
 | |
|         model = Counter
 | |
|         fields = ('id', 'name', 'type', 'is_open', 'barman_list')
 | |
| 
 |