Commit a544e7c7 authored by Giorgos Korfiatis's avatar Giorgos Korfiatis

astakos: Introduce base projects

Every user is associated with a special-purpose `base' project. Its
mission is to manage the user's base quota.
parent 3d71e7cf
This diff is collapsed.
......@@ -469,6 +469,10 @@ class AstakosUser(User):
disturbed_quota = models.BooleanField(_('Needs quotaholder syncing'),
default=False, db_index=True)
# This could have been OneToOneField, but fails due to
# https://code.djangoproject.com/ticket/13781 (fixed in v1.6)
base_project = models.ForeignKey('Project', related_name="base_user")
objects = AstakosUserManager()
@property
......@@ -1596,6 +1600,7 @@ class Project(models.Model):
blank=True,
through='ProjectResourceQuota')
private = models.BooleanField(default=False)
is_base = models.BooleanField(default=False)
objects = ProjectManager()
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment