mirror of
https://github.com/retspen/webvirtcloud
synced 2025-07-31 12:41:08 +00:00
Fix default admin user via @Real-Gecko
This commit is contained in:
parent
b631594556
commit
0814e7c90b
1 changed files with 3 additions and 2 deletions
|
|
@ -6,9 +6,10 @@ from django.db import migrations
|
||||||
def add_useradmin(apps, schema_editor):
|
def add_useradmin(apps, schema_editor):
|
||||||
from django.utils import timezone
|
from django.utils import timezone
|
||||||
from django.contrib.auth.models import User
|
from django.contrib.auth.models import User
|
||||||
|
from accounts.models import UserAttributes
|
||||||
|
|
||||||
User.objects.create_superuser('admin', None, 'admin', last_login=timezone.now())
|
admin = User.objects.create_superuser('admin', None, 'admin', last_login=timezone.now())
|
||||||
|
UserAttributes(user=admin, max_instances=-1, max_cpus=-1, max_memory=-1, max_disk_size=-1).save()
|
||||||
|
|
||||||
class Migration(migrations.Migration):
|
class Migration(migrations.Migration):
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue