Reputation: 928
I'm, trying out django-organizaitons (https://django-organizations.readthedocs.io/en/latest/) and so far it's really handy - however, I wish to extend the basic model by adding another field to a model. The app does provide abstraction classes, but I'm losing some of the core functionality of django-organizations by doing so (e.g email invitations). What's the easiest / best way to simply extend a model and adding another field to that model?
I've got something like this going on:
from organizations.abstract import (AbstractOrganization,
AbstractOrganizationUser,
AbstractOrganizationOwner)
class Project(AbstractOrganization):
name = models.CharField(max_length=100, default="")
project_owner = models.ForeignKey(
"accounts.User", on_delete=models.CASCADE)
class ProjectUser(AbstractOrganizationUser):
# this is a field that I wish to add to the out-of-the-box solution
user_hour_cost = models.DecimalField(max_digits=6, decimal_places=2, default=0)
class ProjectOwner(AbstractOrganizationOwner):
pass
This works fine, as is, but now.. the invitation functionality is gone
Upvotes: 0
Views: 106