Skip to content

Commit

Permalink
RDISCROWD-6112 Onboarding: Install local instance GIGwork
Browse files Browse the repository at this point in the history
Add a cli function to create the first super user admin
  • Loading branch information
ple76 committed Jun 23, 2023
1 parent da45780 commit 1dc5f54
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,16 @@

app = create_app(run_as_server=False)

def create_su():
'''Create the first super user'''
with app.app_context():
from pybossa.core import user_repo
from pybossa.model.user import User
if not user_repo.get_all():
user = User(email_addr='user@user.com', name='user', fullname='user', admin=True)
user.set_password('test')
user_repo.save(user)

def setup_alembic_config():
alembic_cfg = Config("alembic.ini")
command.stamp(alembic_cfg, "head")
Expand Down

0 comments on commit 1dc5f54

Please sign in to comment.