Skip to content

Commit

Permalink
Populate the database when running a demo
Browse files Browse the repository at this point in the history
  • Loading branch information
azmeuk committed May 19, 2023
1 parent 0992bec commit b9931da
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions demo/demoapp.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ def populate():
from canaille.backends.ldap.backend import teardown_backend
from canaille.core.models import Group
from canaille.core.models import User
from canaille.core.populate import fake_groups
from canaille.core.populate import fake_users
from canaille.oidc.models import Client

setup_backend(app)
Expand Down Expand Up @@ -136,6 +138,9 @@ def populate():
)
client2.save()

fake_users(50)
fake_groups(10, nb_users_max=10)

teardown_backend(app)

return app

0 comments on commit b9931da

Please sign in to comment.