forked from github/plane
feat: project preferences (#1652)
This commit is contained in:
parent
679c97bbe3
commit
998fab80b5
@ -31,6 +31,13 @@ def get_default_props():
|
|||||||
"showEmptyGroups": True,
|
"showEmptyGroups": True,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
def get_default_preferences():
|
||||||
|
return {
|
||||||
|
"pages": {
|
||||||
|
"block_display": True
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
class Project(BaseModel):
|
class Project(BaseModel):
|
||||||
NETWORK_CHOICES = ((0, "Secret"), (2, "Public"))
|
NETWORK_CHOICES = ((0, "Secret"), (2, "Public"))
|
||||||
@ -147,6 +154,7 @@ class ProjectMember(ProjectBaseModel):
|
|||||||
role = models.PositiveSmallIntegerField(choices=ROLE_CHOICES, default=10)
|
role = models.PositiveSmallIntegerField(choices=ROLE_CHOICES, default=10)
|
||||||
view_props = models.JSONField(default=get_default_props)
|
view_props = models.JSONField(default=get_default_props)
|
||||||
default_props = models.JSONField(default=get_default_props)
|
default_props = models.JSONField(default=get_default_props)
|
||||||
|
preferences = models.JSONField(default=get_default_preferences)
|
||||||
|
|
||||||
class Meta:
|
class Meta:
|
||||||
unique_together = ["project", "member"]
|
unique_together = ["project", "member"]
|
||||||
|
Loading…
Reference in New Issue
Block a user