initial commit
This commit is contained in:
commit
164fa61ad2
40 changed files with 1263 additions and 0 deletions
0
community_backup/webui/management/__init__.py
Normal file
0
community_backup/webui/management/__init__.py
Normal file
0
community_backup/webui/management/commands/__init__.py
Normal file
0
community_backup/webui/management/commands/__init__.py
Normal file
17
community_backup/webui/management/commands/sync_users.py
Normal file
17
community_backup/webui/management/commands/sync_users.py
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
from django.core.management.base import BaseCommand, CommandError
|
||||
from ...models import BorgRepository
|
||||
from ...deployments import sync_users
|
||||
|
||||
|
||||
class Command(BaseCommand):
|
||||
help = "Synchronized users on the host with the database."
|
||||
|
||||
def handle(self, *args, **options):
|
||||
|
||||
repos = BorgRepository.objects.all()
|
||||
|
||||
for repo in repos:
|
||||
self.stdout.write(f"{repo}")
|
||||
self.stdout.write(self.style.SUCCESS("This is a test"))
|
||||
|
||||
sync_users(dry_run=False)
|
||||
Loading…
Add table
Add a link
Reference in a new issue