1
0
Fork 0
mirror of https://github.com/fastogt/fastocloud_admin.git synced 2025-03-09 23:38:52 +00:00
* Pymodm

* Up

* Review

* More logs

* Connect without check

* Alias

* Review

* Fixes
This commit is contained in:
Alexandr Topilski 2020-02-17 17:12:18 +03:00 committed by GitHub
parent 115483e7b5
commit d50b6634f2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
21 changed files with 142 additions and 84 deletions

View file

@ -2,7 +2,7 @@
import argparse
import os
import sys
from mongoengine import connect
from pymodm import connect
sys.path.append(os.path.join(os.path.dirname(__file__), '..'))
@ -22,10 +22,7 @@ if __name__ == '__main__':
email = argv.email
password = argv.password
mongo = connect(host=argv.mongo_uri)
if not mongo:
sys.exit(1)
connect(mongodb_uri=argv.mongo_uri)
new_user = ProviderAdminUser.make_provider(email=email.lower(), password=password, country=argv.country,
language=argv.language)
new_user.status = ProviderAdminUser.Status.ACTIVE