Skip to content

Commit

Permalink
Merge pull request #23 from sitn/fix_no_admin_in_tests
Browse files Browse the repository at this point in the history
use env vars when creating admin user
  • Loading branch information
maltaesousa authored Jul 17, 2024
2 parents 3c225d1 + f47e8a6 commit 6d158b9
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions api/migrations/0002_auto_20200731_0904.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Generated by Django 3.0.8 on 2020-07-22 06:41
import os
from django.db import migrations, models
from django.db import migrations
from django.utils.translation import gettext_lazy as _


Expand All @@ -13,8 +13,8 @@ class Migration(migrations.Migration):
def generate_superuser(apps, schema_editor):
from django.contrib.auth.models import User
superuser = User.objects.create_superuser(
username='admin',
password=os.environ.get('DJANGO_SU_EMAIL', 'admin'))
username=os.environ.get('ADMIN_USERNAME', 'admin'),
password=os.environ['ADMIN_PASSWORD'])

superuser.save()

Expand Down

0 comments on commit 6d158b9

Please sign in to comment.