Skip to content

angee.projects.models

Projects, milestones, tasks, involvement, relations, and external links.

ProjectManager

python
class ProjectManager(AngeeManager)

Own the idempotent Task-to-Project maturation write.

from_task

python
def from_task(task: models.Model) -> models.Model

Return the one project promoted from task, creating it if needed.

TaskManager

python
class TaskManager(AngeeManager)

Own task creation policy and ThreadActivity maturation.

check_create

python
def check_create(
        relationships: Mapping[str, Sequence[Any]] | None = None
) -> SubjectRef

Require project write when a new task is attached to a project.

from_activity

python
def from_activity(activity: models.Model) -> models.Model

Return the one task promoted from activity, creating it if needed.

LinkManager

python
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

python
def create(**kwargs: Any) -> models.Model

Create through the URL-keyed upsert contract.

upsert

python
def upsert(*,
           target: models.Model,
           url: str,
           title: str = "",
           metadata: Mapping[str, Any] | None = None,
           **fields: Any) -> models.Model

Create or update one link per canonical target and URL.

target_relation

python
@classmethod
def target_relation(cls, target: models.Model) -> str

Return the one projects/link relation for an allowed target.

target_model

python
@classmethod
def target_model(cls, model_label: str) -> type[models.Model]

Return the installed model for an allowed link target label.

Project

python
class Project(AuditMixin, ThreadedModelMixin, HistoryMixin, RevisionMixin,
              AngeeDataModel)

A bounded endeavor whose access is owned by direct ReBAC grants.

ProjectStatus

python
class ProjectStatus(models.TextChoices)

Coarse project lifecycle states.

ProjectDateResolution

python
class ProjectDateResolution(models.TextChoices)

Precision carried by a project planning date.

Meta

python
class Meta()

Django model options for projects.

__str__

python
def __str__() -> str

Return the project title.

pause

python
def pause() -> Project

Pause this project, idempotently.

resume

python
def resume() -> Project

Return this project to open work, idempotently.

complete

python
def complete() -> Project

Complete this project, idempotently.

drop

python
def drop() -> Project

Drop this project, idempotently.

Milestone

python
class Milestone(AuditMixin, AngeeDataModel)

A named marker reached within one project.

Meta

python
class Meta()

Django model options for milestones.

__str__

python
def __str__() -> str

Return the milestone name.

Task

python
class Task(AuditMixin, ThreadedModelMixin, HistoryMixin, AngeeDataModel)

The platform's one table for a discrete human action.

TaskStatus

python
class TaskStatus(models.TextChoices)

Coarse task lifecycle states.

TaskDroppedReason

python
class TaskDroppedReason(models.TextChoices)

Reasons an action leaves the plan without completion.

TaskPriority

python
class TaskPriority(models.TextChoices)

Human urgency carried by a task.

Meta

python
class Meta()

Django model options for tasks.

__str__

python
def __str__() -> str

Return the task title.

clean

python
def clean() -> None

Normalize insert lifecycle state and reject invalid task structure.

save

python
def save(*args: Any, **kwargs: Any) -> None

Persist after revalidating mutable project structure.

complete

python
def complete() -> Task

Mark this task done, idempotently preserving its first completion time.

drop

python
def drop(reason: str | TaskDroppedReason) -> Task

Drop this task for reason, idempotently preserving the drop time.

reopen

python
def reopen() -> Task

Return a done or dropped task to the open state, idempotently.

promote_to_project

python
def promote_to_project() -> models.Model

Return the one project matured from this task.

TaskRelation

python
class TaskRelation(AuditMixin, AngeeDataModel)

One canonical directed relation between two tasks.

TaskRelationKind

python
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

python
class Meta()

Django model options for task relations.

clean

python
def clean() -> None

Canonicalize symmetric endpoints before constraint validation.

save

python
def save(*args: Any, **kwargs: Any) -> None

Persist symmetric relations in deterministic endpoint order.

inverse_kind

python
@property
def inverse_kind() -> str

Return the relation vocabulary seen from related_task.

__str__

python
def __str__() -> str

Return a readable directed edge.

Participant

python
class Participant(AuditMixin, AngeeDataModel)

A party's involvement in a project, never an access grant.

ParticipantKind

python
class ParticipantKind(models.TextChoices)

Ways a party can be involved in a project.

Meta

python
class Meta()

Django model options for project participants.

__str__

python
def __str__() -> str

Return a readable involvement label.

python
class Link(AuditMixin, RecordRefMixin, AngeeDataModel)

A URL-keyed external reference attached to a project or task.

Meta

python
class Meta()

Django model options for project and task links.

clean

python
def clean() -> None

Reject targets outside the project/task record surface.

__str__

python
def __str__() -> str

Return the link title or URL.

ThreadActivityProjects

python
class ThreadActivityProjects(AngeeModel)

Contribute Activity-to-Task maturation onto messaging.ThreadActivity.

Meta

python
class Meta()

Abstract same-row behavior donor for messaging.ThreadActivity.

promote_to_task

python
def promote_to_task() -> models.Model

Return the one task matured from this thread activity.

Released under the AGPL-3.0 License.