forked from uncloud/uncloud
Pay: move some model-related methods from helpers to models
Otherwise we end up in circular dependency hell
This commit is contained in:
parent
e0cb6ac670
commit
9aabc66e57
6 changed files with 108 additions and 107 deletions
|
|
@ -7,7 +7,7 @@ from django.core.exceptions import ObjectDoesNotExist
|
|||
|
||||
from datetime import timedelta, date
|
||||
from django.utils import timezone
|
||||
from uncloud_pay.helpers import generate_bills_for
|
||||
from uncloud_pay.models import Bill
|
||||
|
||||
BILL_PAYMENT_DELAY=timedelta(days=10)
|
||||
|
||||
|
|
@ -28,7 +28,7 @@ class Command(BaseCommand):
|
|||
|
||||
for user in users:
|
||||
now = timezone.now()
|
||||
generate_bills_for(
|
||||
Bill.generate_for(
|
||||
year=now.year,
|
||||
month=now.month,
|
||||
user=user,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue