do not import pay->auth

Try to keep common things in the "uncloud" module
This commit is contained in:
Nico Schottelius 2020-12-06 11:53:37 +01:00
commit 0fd5ac18cd
3 changed files with 8 additions and 16 deletions

View file

@ -2,8 +2,7 @@ from django.contrib.auth.models import AbstractUser
from django.db import models
from django.core.validators import MinValueValidator
from uncloud_pay import AMOUNT_DECIMALS, AMOUNT_MAX_DIGITS
from uncloud_pay.models import get_balance_for_user
from uncloud import AMOUNT_DECIMALS, AMOUNT_MAX_DIGITS
class User(AbstractUser):
"""
@ -16,10 +15,3 @@ class User(AbstractUser):
max_digits=AMOUNT_MAX_DIGITS,
decimal_places=AMOUNT_DECIMALS,
validators=[MinValueValidator(0)])
# @property
# def primary_billing_address(self):
@property
def balance(self):
return get_balance_for_user(self)