From 92b45b2f110a98589289cfc3e317670e6ff0a49d Mon Sep 17 00:00:00 2001 From: Marcello Stanisci Date: Thu, 24 Jan 2019 14:42:14 +0100 Subject: Give very big initial amount to Survey account. --- .../app/management/commands/provide_accounts.py | 28 +++++++++++++++------- 1 file changed, 20 insertions(+), 8 deletions(-) diff --git a/talerbank/app/management/commands/provide_accounts.py b/talerbank/app/management/commands/provide_accounts.py index 6bf8c53..4a6c545 100644 --- a/talerbank/app/management/commands/provide_accounts.py +++ b/talerbank/app/management/commands/provide_accounts.py @@ -1,16 +1,18 @@ # This file is part of TALER # (C) 2014, 2015, 2106 INRIA # -# TALER is free software; you can redistribute it and/or modify it under the -# terms of the GNU General Public License as published by the Free Software -# Foundation; either version 3, or (at your option) any later version. +# TALER is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as +# published by the Free Software Foundation; either version 3, or (at your option) any later version. # -# TALER is distributed in the hope that it will be useful, but WITHOUT ANY -# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR -# A PARTICULAR PURPOSE. See the GNU General Public License for more details. +# TALER is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. # -# You should have received a copy of the GNU General Public License along with -# TALER; see the file COPYING. If not, see +# You should have received a copy of the GNU General Public +# License along with TALER; see the file COPYING. If not, +# see # # @author Marcello Stanisci # @author Florian Dold @@ -22,6 +24,8 @@ from django.db.utils import ProgrammingError, OperationalError from django.core.management.base import BaseCommand from django.conf import settings from ...models import BankAccount +from ...views import wire_transfer +from ...amount import Amount LOGGER = logging.getLogger(__name__) LOGGER.setLevel(logging.INFO) @@ -45,6 +49,14 @@ def make_account(username): exc_info=True) sys.exit(1) + if "Survey" == username: + bank = BankAccount.objects.get(account_no=1) + survey = BankAccount.objects.get(account_no=8) + wire_transfer(Amount(settings.TALER_CURRENCY, 10000000), + bank, + survey, + "Benevolent donation for 'Survey'") + class Command(BaseCommand): help = "Provide initial user accounts" -- cgit v1.2.3