Download pool/shard005/Python/0044719_createsuperuser.py from Variable-role/sajaniemi_variable_dataset_large: direct link, hf CLI and curl.
- Browser
- Download file 526 Bytes
-
https://huggingface.co/datasets/Variable-role/sajaniemi_variable_dataset_large/resolve/main/pool/shard005/Python/0044719_createsuperuser.py
- Command line
-
hf download hf://datasets/Variable-role/sajaniemi_variable_dataset_large/pool/shard005/Python/0044719_createsuperuser.py
-
curl -L -o 0044719_createsuperuser.py https://huggingface.co/datasets/Variable-role/sajaniemi_variable_dataset_large/resolve/main/pool/shard005/Python/0044719_createsuperuser.py
526 Bytes
| from django.core.management.base import BaseCommand | |
| from ...models import User | |
| class Command(BaseCommand): | |
| """ | |
| Command to create or reset the admin user. | |
| """ | |
| help = "Creates or resets the admin user." | |
| def handle(self, *args, **options): | |
| created = User.objects.create_or_reset_admin_user() | |
| if created: | |
| self.stdout.write(self.style.SUCCESS("Admin user successfully created.")) | |
| else: | |
| self.stdout.write(self.style.SUCCESS("Admin user successfully reset.")) | |