from django.conf import settings
from django.db import models
+from pithos.im.interface import get_quota, set_quota
+
class User(models.Model):
ACCOUNT_STATE = (
@property
def quota(self):
- return settings.DEFAULT_QUOTA
+ return get_quota(self.uniq)
@quota.setter
def quota(self, value):
- logging.debug('Set quota to: %s', value)
+ set_quota(self.uniq, value)
def save(self, update_timestamps=True, **kwargs):
if update_timestamps: