@@ -103,8 +103,10 @@ def setup():#
103
103
except Exception as e :
104
104
email = ""
105
105
if username and password and email :
106
- # subprocess.run(['python', '-m', 'pipenv', 'run', 'python', os.path.join("src", "manage.py"), 'createsuperuser', '--no-input', '--username='+username, '--email='+email])
107
- subprocess .run (['python' , '-m' , 'pipenv' , 'run' , 'python' , os .path .join ("src" , "manage.py" ), 'createsuperuser' , '--username=' + username , '--email=' + email ])
106
+ findReplaceAt ('.env' , 'DJANGO_SUPERUSER_PASSWORD=password\n ' , 'DJANGO_SUPERUSER_PASSWORD=' + password + '\n ' , 1 )
107
+ # subprocess.run(['python', '-m', 'pipenv', 'run', 'python', os.path.join("src", "manage.py"), 'createsuperuser', '--username='+username, '--email='+email])
108
+ subprocess .run (['python' , '-m' , 'pipenv' , 'run' , 'python' , os .path .join ("src" , "manage.py" ), 'createsuperuser' , '--no-input' , '--username=' + username , '--email=' + email ])
109
+ findReplaceAt ('.env' , 'DJANGO_SUPERUSER_PASSWORD=' + password + '\n ' , 'DJANGO_SUPERUSER_PASSWORD=password\n ' , 1 )
108
110
else :
109
111
print ('Enter following details for root user' )
110
112
subprocess .run (['python' , '-m' , 'pipenv' , 'run' , 'python' , os .path .join ("src" , "manage.py" ), 'createsuperuser' ])
0 commit comments