# 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 django.core.management import BaseCommand
from attendance.models import SSIDName



class Command(BaseCommand):
    help = 'Generates a new ssid(need to run as a cron job everyday)'

    def handle(self, *args, **options):

# 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/management/commands/update_ssid.py
from django.core.management import BaseCommand
from attendance.models import SSIDName




class Command(BaseCommand):
    help = 'Generates a new ssid(need to run as a cron job everyday)'

    def handle(self, *args, **options):

        ssid_name, created = SSIDName.objects.get_or_create(id=1)