# Path: attendance/models.py
# class SSIDName(models.Model):
#     name = models.CharField(max_length=30)
# 
#     def generate_random_name(self):
#         size = random.randint(10, 17)
#         chars = string.ascii_lowercase + string.digits
#         self.name = ''.join(random.choice(chars) for _ in range(size))
# 
#     def __str__(self):
#         return self.name


from rest_framework import serializers
from attendance.models import SSIDName



class SSIDNameSerializer(serializers.ModelSerializer):

    class Meta:
        model = SSIDName
        fields = ['name']

# Path: attendance/models.py
# class SSIDName(models.Model):
#     name = models.CharField(max_length=30)
# 
#     def generate_random_name(self):
#         size = random.randint(10, 17)
#         chars = string.ascii_lowercase + string.digits
#         self.name = ''.join(random.choice(chars) for _ in range(size))
# 
#     def __str__(self):
#         return self.name


# Path: attendance/serializers.py
from rest_framework import serializers
from attendance.models import SSIDName




class SSIDNameSerializer(serializers.ModelSerializer):

    class Meta:
        model = SSIDName
        fields = ['name']

        read_only_fields = ['name']