angee.projects.models
Projects, milestones, tasks, involvement, relations, and external links.
ProjectManager
class ProjectManager(AngeeManager)Own the idempotent Task-to-Project maturation write.
from_task
def from_task(task: models.Model) -> models.ModelReturn the one project promoted from task, creating it if needed.
TaskManager
class TaskManager(AngeeManager)Own task creation policy and ThreadActivity maturation.
check_create
def check_create(
relationships: Mapping[str, Sequence[Any]] | None = None
) -> SubjectRefRequire project write when a new task is attached to a project.
from_activity
def from_activity(activity: models.Model) -> models.ModelReturn the one task promoted from activity, creating it if needed.
LinkManager
class LinkManager(AngeeManager)Own URL-keyed upserts and target-derived ReBAC relations.
TARGET_RELATIONS
Allowed target model labels mapped to their projects/link relation.
create
def create(**kwargs: Any) -> models.ModelCreate through the URL-keyed upsert contract.
upsert
def upsert(*,
target: models.Model,
url: str,
title: str = "",
metadata: Mapping[str, Any] | None = None,
**fields: Any) -> models.ModelCreate or update one link per canonical target and URL.
target_relation
@classmethod
def target_relation(cls, target: models.Model) -> strReturn the one projects/link relation for an allowed target.
target_model
@classmethod
def target_model(cls, model_label: str) -> type[models.Model]Return the installed model for an allowed link target label.
Project
class Project(AuditMixin, ThreadedModelMixin, HistoryMixin, RevisionMixin,
AngeeDataModel)A bounded endeavor whose access is owned by direct ReBAC grants.
ProjectStatus
class ProjectStatus(models.TextChoices)Coarse project lifecycle states.
ProjectDateResolution
class ProjectDateResolution(models.TextChoices)Precision carried by a project planning date.
Meta
class Meta()Django model options for projects.
__str__
def __str__() -> strReturn the project title.
pause
def pause() -> ProjectPause this project, idempotently.
resume
def resume() -> ProjectReturn this project to open work, idempotently.
complete
def complete() -> ProjectComplete this project, idempotently.
drop
def drop() -> ProjectDrop this project, idempotently.
Milestone
class Milestone(AuditMixin, AngeeDataModel)A named marker reached within one project.
Meta
class Meta()Django model options for milestones.
__str__
def __str__() -> strReturn the milestone name.
Task
class Task(AuditMixin, ThreadedModelMixin, HistoryMixin, AngeeDataModel)The platform's one table for a discrete human action.
TaskStatus
class TaskStatus(models.TextChoices)Coarse task lifecycle states.
TaskDroppedReason
class TaskDroppedReason(models.TextChoices)Reasons an action leaves the plan without completion.
TaskPriority
class TaskPriority(models.TextChoices)Human urgency carried by a task.
Meta
class Meta()Django model options for tasks.
__str__
def __str__() -> strReturn the task title.
clean
def clean() -> NoneNormalize insert lifecycle state and reject invalid task structure.
save
def save(*args: Any, **kwargs: Any) -> NonePersist after revalidating mutable project structure.
complete
def complete() -> TaskMark this task done, idempotently preserving its first completion time.
drop
def drop(reason: str | TaskDroppedReason) -> TaskDrop this task for reason, idempotently preserving the drop time.
reopen
def reopen() -> TaskReturn a done or dropped task to the open state, idempotently.
promote_to_project
def promote_to_project() -> models.ModelReturn the one project matured from this task.
TaskRelation
class TaskRelation(AuditMixin, AngeeDataModel)One canonical directed relation between two tasks.
TaskRelationKind
class TaskRelationKind(models.TextChoices)Canonical task relation kinds.
SYMMETRIC_KINDS
Kinds whose endpoints have no semantic direction.
Duplicate edges deliberately keep task -> related_task direction: the first endpoint is the duplicate and the second is its canonical task.
Meta
class Meta()Django model options for task relations.
clean
def clean() -> NoneCanonicalize symmetric endpoints before constraint validation.
save
def save(*args: Any, **kwargs: Any) -> NonePersist symmetric relations in deterministic endpoint order.
inverse_kind
@property
def inverse_kind() -> strReturn the relation vocabulary seen from related_task.
__str__
def __str__() -> strReturn a readable directed edge.
Participant
class Participant(AuditMixin, AngeeDataModel)A party's involvement in a project, never an access grant.
ParticipantKind
class ParticipantKind(models.TextChoices)Ways a party can be involved in a project.
Meta
class Meta()Django model options for project participants.
__str__
def __str__() -> strReturn a readable involvement label.
Link
class Link(AuditMixin, RecordRefMixin, AngeeDataModel)A URL-keyed external reference attached to a project or task.
Meta
class Meta()Django model options for project and task links.
clean
def clean() -> NoneReject targets outside the project/task record surface.
__str__
def __str__() -> strReturn the link title or URL.
ThreadActivityProjects
class ThreadActivityProjects(AngeeModel)Contribute Activity-to-Task maturation onto messaging.ThreadActivity.
Meta
class Meta()Abstract same-row behavior donor for messaging.ThreadActivity.
promote_to_task
def promote_to_task() -> models.ModelReturn the one task matured from this thread activity.