Core Checklists
The core checklist module provides a flexible questionnaire system that enables organizations to manage various types of compliance and metadata requirements through customizable questionnaires with conditional logic and review workflows.
Overview
The checklist system is designed as an extendable staff-configured metadata schema to be used in different scenarios, for example:
- Project Metadata: Extendable schema for project metadata
- Project Compliance: Ensures projects meet organizational standards
- Proposal Compliance: Validates proposals before submission
- Offering Compliance: Verifies marketplace offerings meet requirements
Core Models
Category
Groups checklists by category with icon support for UI display. Categories provide organizational structure for managing different types of compliance checklists.
Checklist
Main container for compliance questions. Each checklist has a type (project/proposal/offering compliance/project metadata) and contains an ordered set of questions that users must complete.
Key features:
- Type-based categorization (project_compliance, proposal_compliance, offering_compliance, project_metadata)
- Dynamic question visibility based on user context and dependencies
- Optional category grouping for UI organization
- Timestamped for audit trail
Question
Individual questions with configurable types, ordering, conditional user guidance, and review trigger logic based on answer values.
Question Types:
- Boolean: Yes/No/N/A responses
- Single Select: Choose one option from a list
- Multi Select: Choose multiple options from a list
- Text Input: Short text responses
- Text Area: Long text responses
- Number: Numeric input with optional min/max validation constraints
- Date: Date selection
- File: File upload (planned)
Features:
- Conditional visibility based on dependencies
- Review triggering based on answer values
- Conditional user guidance display
- Required/optional questions
- Ordered display
NUMBER Question Type Validation
NUMBER type questions support optional validation constraints for form generation and server-side validation:
- min_value: Minimum allowed numeric value (decimal field with 4 decimal places)
- max_value: Maximum allowed numeric value (decimal field with 4 decimal places)
- Validation: Server-side validation rejects answers outside the specified range
- UI Integration: Min/max values are exposed through serializers for client-side form constraints
- Format Support: Accepts both integer and floating-point numbers
Example API Usage:
1 2 3 4 5 6 7 8 9 10 11 12 13 |
|
Validation Scenarios:
- Budget ranges (e.g., $1K - $10M)
- Percentages (0-100)
- Age ranges (18-100)
- Scientific measurements with decimal precision
- Counts and quantities with natural limits
QuestionOption
Multiple choice options for select-type questions with ordering support. Provides the available choices for single-select and multi-select questions.
QuestionDependency
Conditional visibility logic - questions can depend on other questions' answers with circular dependency prevention. This enables dynamic questionnaires that adapt based on user responses.
Operators supported:
equals
: Exact matchnot_equals
: Not equal tocontains
: Text contains substringin
: Value exists in listnot_in
: Value does not exist in list
ChecklistCompletion
Generic completion tracking model that links checklists to any domain object (proposals, projects, etc.) using Django's generic foreign key system.
Features:
- Generic foreign key to any model (scope)
- Completion status tracking
- Review requirement detection
- Reviewer assignment and notes
- Completion percentage calculation
Answer
User responses linked to ChecklistCompletion objects, stored as JSON with automatic review flagging and reviewer tracking.
Features:
- Flexible JSON storage for different answer types
- Automatic review requirement detection based on question configuration
- Review workflow with reviewer assignment and notes
- Audit trail with timestamps
- Answer validation based on question type
- Unique constraints per completion/question/user
API Endpoints
Core Endpoints
GET /api/checklists-admin-categories/
- List checklist categoriesGET /api/checklists-admin-categories/{uuid}/
- Category details
Admin Endpoints (Staff Only)
GET /api/checklists-admin/
- List checklists (staff only)POST /api/checklists-admin/
- Create checklist (staff only)GET /api/checklists-admin/{uuid}/
- Checklist details (staff only)PUT/PATCH /api/checklists-admin/{uuid}/
- Update checklist (staff only)DELETE /api/checklists-admin/{uuid}/
- Delete checklist (staff only)-
GET /api/checklists-admin/{uuid}/questions/
- List checklist questions (staff only) -
GET /api/checklists-admin-questions/
- List all questions (staff only) POST /api/checklists-admin-questions/
- Create question (staff only)GET /api/checklists-admin-questions/{uuid}/
- Question details (staff only)PUT/PATCH /api/checklists-admin-questions/{uuid}/
- Update question (staff only)-
DELETE /api/checklists-admin-questions/{uuid}/
- Delete question (staff only) -
GET /api/checklists-admin-question-options/
- List question options (staff only) POST /api/checklists-admin-question-options/
- Create option (staff only)GET /api/checklists-admin-question-dependencies/
- List question dependencies (staff only)POST /api/checklists-admin-question-dependencies/
- Create question dependency (staff only)- Full CRUD operations on question options and dependencies
Integration via ViewSet Mixins
The core checklist module provides ViewSet mixins for integration into other apps:
UserChecklistMixin - For end users filling checklists:
GET /{app}/{uuid}/checklist/
- Get checklist questions with user's answersGET /{app}/{uuid}/completion_status/
- Get completion statusPOST /{app}/{uuid}/submit_answers/
- Submit answers
ReviewerChecklistMixin - For reviewers (with sensitive review logic):
GET /{app}/{uuid}/checklist_review/
- Get full checklist with review triggersGET /{app}/{uuid}/completion_review_status/
- Get completion with review details
Examples:
GET /api/proposals/{uuid}/checklist/
- Get proposal checklistPOST /api/proposals/{uuid}/submit_answers/
- Submit proposal answersGET /api/proposals/{uuid}/checklist_review/
- Review proposal checklist (reviewers only)
Question Dependencies
The system supports sophisticated conditional logic through question dependencies:
- Simple Dependencies: Show Question B only if Question A equals specific value
- Complex Dependencies: Multiple conditions with different operators
- Circular Prevention: Automatic detection and prevention of circular dependencies
- Dynamic Visibility: Real-time question showing/hiding based on current answers
Example: A security questionnaire might only show cloud-specific questions if the user indicates they use cloud services.
Review Workflow
Questions can be configured to trigger reviews based on answers:
- Automatic Review Triggers: Specific answer values trigger review requirements
- Always Review: Questions that always require review regardless of answer
- Review Assignment: Staff can be assigned to review flagged answers
- Review Notes: Internal notes and approval tracking
Configuring Conditional Visibility via REST API
The checklist system supports sophisticated conditional logic through two mechanisms: Question Dependencies (for question visibility) and Conditional User Guidance (for guidance text display). Both use the same flexible operator-based system.
Supported Operators
All conditional logic supports these operators, with specific question type compatibility:
equals
- Exact match- Compatible with: NUMBER, DATE, BOOLEAN question types
-
Example: Check if boolean answer is
true
, or if number equals100
-
not_equals
- Not equal to - Compatible with: NUMBER, DATE, BOOLEAN question types
-
Example: Check if boolean answer is not
false
, or if number is not0
-
contains
- Text contains substring - Compatible with: TEXT_INPUT, TEXT_AREA question types
- Example: Check if text answer contains "sensitive" or "export"
-
Note: Case-sensitive matching
-
in
- Value exists in list - Compatible with: SINGLE_SELECT, MULTI_SELECT question types
- Example: Check if selected option is one of
["high", "critical", "urgent"]
- Note: For single-select, checks if the selected value is in the condition list
-
Note: For multi-select, checks if any selected value is in the condition list
-
not_in
- Value does not exist in list - Compatible with: SINGLE_SELECT, MULTI_SELECT question types
- Example: Check if selected option is not one of
["low", "minimal"]
- Note: For single-select, checks if the selected value is not in the condition list
- Note: For multi-select, checks if none of the selected values are in the condition list
Question Dependencies (Conditional Visibility)
Configure questions to show/hide based on answers to other questions.
Creating a Question Dependency
1 2 3 4 5 6 7 8 9 |
|
Example Scenarios
1. Show cloud questions only if user selects "cloud" deployment:
1 2 3 4 5 6 7 |
|
2. Show security questions if user indicates sensitive data:
1 2 3 4 5 6 7 |
|
3. Show budget questions for high-value options:
1 2 3 4 5 6 7 |
|
Conditional User Guidance
Configure guidance text to appear based on user answers.
Creating a Question with Always-Visible Guidance
1 2 3 4 5 6 7 8 9 10 11 12 |
|
Creating a Question with Conditional Guidance
1 2 3 4 5 6 7 8 9 10 11 12 13 14 |
|
Updating Conditional Guidance
1 2 3 4 5 6 7 8 9 |
|
Example Scenarios
1. Show compliance guidance only for "Yes" answers:
1 2 3 4 5 6 7 8 9 |
|
2. Show warning guidance for multiple selections:
1 2 3 4 5 6 7 8 9 |
|
3. Show budget guidance for high-value project categories:
1 2 3 4 5 6 7 8 9 |
|
Complex Scenarios
Multi-Level Dependencies
Create cascading question visibility:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 |
|
Combined Review Triggers and Guidance
Configure a question that both shows guidance and triggers reviews:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 |
|
API Response Examples
When questions are retrieved through user-facing endpoints, conditional logic is automatically applied:
Question with visible guidance:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 |
|
Question with hidden guidance (condition not met):
1 2 3 4 5 6 7 8 9 10 |
|
Configuring Review Triggers and User Guidance
Beyond conditional visibility, questions can be configured with review triggers (to flag answers for staff review) and conditional user guidance (to show context-sensitive help text). Both features use the same operator system for maximum flexibility.
Review Trigger Configuration
Review triggers automatically flag specific answers for staff review, enabling compliance workflows and quality control.
Basic Review Trigger Setup
1. Always Require Review:
1 2 3 4 5 6 7 8 9 10 11 |
|
2. Conditional Review Trigger:
1 2 3 4 5 6 7 8 9 10 11 12 13 |
|
Review Trigger Scenarios
1. Security Review for High-Risk Projects:
1 2 3 4 5 6 7 8 |
|
2. Budget Review for Large Expenditures:
1 2 3 4 5 6 7 8 |
|
3. Compliance Review for Specific Text Content:
1 2 3 4 5 6 7 8 |
|
4. Multiple Review Conditions:
1 2 3 4 5 6 7 8 |
|
Advanced User Guidance Configuration
User guidance provides contextual help that appears based on user answers, improving completion rates and data quality.
Static vs Conditional Guidance
1. Static Guidance (Always Visible):
1 2 3 4 5 6 7 |
|
2. Conditional Guidance (Answer-Dependent):
1 2 3 4 5 6 7 8 9 |
|
User Guidance Scenarios
1. Regulatory Guidance for EU Users:
1 2 3 4 5 6 7 8 9 |
|
2. Technical Guidance for Specific Technologies:
1 2 3 4 5 6 7 8 9 |
|
3. Process Guidance for Complex Workflows:
1 2 3 4 5 6 7 8 9 |
|
4. Warning Guidance for Risk Factors:
1 2 3 4 5 6 7 8 9 |
|
Combined Review and Guidance Workflows
Configure questions that both provide guidance and trigger reviews for comprehensive workflows.
Example: Financial Transaction Handling
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 |
|
Example: Multi-Condition Security Workflow
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 |
|
Updating Existing Questions
Adding Review Triggers to Existing Questions
1 2 3 4 5 6 7 8 |
|
Modifying User Guidance
1 2 3 4 5 6 7 8 9 |
|
Removing Conditions
1 2 3 4 5 6 7 8 9 10 11 |
|
API Response Examples for Review and Guidance
Question with Active Guidance (User View)
1 2 3 4 5 6 7 8 9 10 11 12 13 |
|
Question with Review Flag (Reviewer View)
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 |
|
Completion Status with Review Summary
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 |
|
Best Practices
Review Trigger Design
- Clear Criteria: Use specific, unambiguous trigger conditions
- Risk-Based: Focus triggers on high-risk or compliance-critical answers
- Consistent Operators: Use the same operators across similar question types
- Documentation: Include internal notes about why specific answers trigger reviews
User Guidance Best Practices
- Actionable: Provide specific next steps, not just information
- Contextual: Tailor guidance to the specific answer given
- Timely: Show guidance when users need it most
- Resource Links: Include references to relevant documentation or contacts
Workflow Integration
- Progressive Disclosure: Use conditional visibility with guidance to reduce cognitive load
- Layered Validation: Combine client-side guidance with server-side review triggers
- Clear Feedback: Ensure users understand when answers will be reviewed
- Review Efficiency: Design triggers to minimize false positives for reviewers
Permission System
Access control is implemented through:
- Staff Administration: Direct checklist management restricted to staff users
- App-level Integration: Checklist access controlled via host application permissions
- Mixin-based Permissions: Apps define their own permission requirements for checklist actions
- Review Segregation: Separate permissions for users vs reviewers to hide sensitive review logic
Validation and Data Integrity
The system includes comprehensive validation:
- Answer Type Validation: Ensures answers match expected question types
- Required Question Enforcement: Prevents submission of incomplete required questions
- UUID Validation: Proper UUID format checking for references
- Circular Dependency Prevention: Automatic detection of invalid dependency chains
Integration with Waldur Apps
The checklist system integrates with various Waldur applications:
- Generic Foreign Key System: Can be attached to any Django model (proposals, projects, resources, etc.)
- ViewSet Mixins: Easy integration through
UserChecklistMixin
andReviewerChecklistMixin
- Flexible Completion Tracking: Each integration controls its own completion lifecycle
- Permission Delegation: Host applications define appropriate permission checks
Usage Patterns
Basic Integration Flow
- Admin Setup: Staff creates checklists with questions, dependencies, and review triggers
- App Integration: Host app (e.g., proposals) creates
ChecklistCompletion
objects linking checklists to domain objects - User Interaction: End users access checklists through app-specific endpoints using
UserChecklistMixin
- Answer Submission: Users submit answers, triggering automatic completion status updates
- Review Process: Reviewers access full checklist information through
ReviewerChecklistMixin
- Completion Tracking: Host apps monitor completion status and take appropriate actions
Example Integration (Proposals)
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 |
|
Technical Implementation
The module follows Waldur's standard architecture patterns:
- Django Models: Standard ORM with mixins (UuidMixin, DescribableMixin, TimeStampedModel)
- Generic Foreign Keys: Flexible linking to any Django model through ChecklistCompletion
- DRF Serializers: REST API serialization with context-aware field exposure
- ViewSet Mixins: Reusable mixins for consistent integration across applications
- Admin-Only Core APIs: Direct checklist management restricted to staff
- Permissions: Delegated to host applications with mixin-based controls
- Filtering: Advanced filtering for admin interfaces
- Validation: Answer validation based on question types and business rules
Architecture Principles
- Separation of Concerns: Core checklist logic separated from app-specific business logic
- Flexible Integration: Generic foreign keys allow attachment to any model
- Security by Design: Review logic hidden from users, exposed only to authorized reviewers
- Extensible Question Types: Support for multiple answer formats with validation
- Dependency Management: Sophisticated conditional logic with circular prevention
The system is designed for scalability and extensibility, supporting complex compliance scenarios while maintaining ease of integration for host applications.