Models¶
Django Models
Models for the DCPS app.
Functions:
Name | Description |
---|---|
project_timestamp |
Updates the last_modified timestamp of a project if it exists. |
Enumerations
ViewAccess: Enumeration for view access levels.
Models
UserProfile: A user profile model. Project: Project model. UserProjectAttribute: A user project attribute model. ProjectGroup: A project group model.
ViewAccess
¶
Bases: TextChoices
Enumeration for view access levels.
Attributes: PRIVATE: Represents a private access level. MEMBERS: Represents an access level for members only. PUBLIC: Represents a public access level.
Source code in app/dcsp/app/models.py
39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 |
|
project_timestamp(project_id)
¶
Updates the last_modified timestamp of a project if it exists.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
project_id
|
int
|
The id of the project to update. |
required |
Returns:
Name | Type | Description |
---|---|---|
bool |
bool
|
True if the project exists and was updated, False otherwise. |
Source code in app/dcsp/app/models.py
60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 |
|