Third Party Monitoring Module
  • Third Party Monitoring Module Documentation
  • INTRODUCTION
    • Glossary / Terminology
    • FAQ
    • Releases / Changelog*
    • Report an Issue / Contact us
  • PRODUCT / END-USER DOCUMENTATION
    • Overview
      • User rights and permissions
    • Third Party Monitoring Module Navigation
    • Overall User Interface
    • Third Party Monitors section
      • List of Third Party Monitors
      • TPM partner details screen
    • List of Visits section
      • List of Visits
      • Visit details
      • Statuses and corresponding actions
        • Draft
        • Assigned
        • TPM Accepted
        • TPM Rejected
        • Cancelled
        • TPM Reported
        • Sent Back to TPM
        • UNICEF Approved
      • Emails notifications flow
    • TPM workflow
  • TECHNICAL DOCUMENTATION
    • Architecture
    • Development Setup
    • Deployment / DevOps
    • Backend Module structure
    • Data Model
    • Fixtures & management commands
    • API Documentation
      • Error Handling
    • Synchronization with VISION
    • Permissions framework
    • FSM Transitions conditions
    • FSM Transitions in view
    • API Metadata
    • Serializer Mixins
    • Model Mixins
    • Tests
    • Attachments
    • Email links & Tokens Authorization
    • Frontend
      • Module structure
      • Build process
      • Tests
Powered by GitBook
On this page
  • TPM module files structure
  • tpm.tpmpartners app
  1. TECHNICAL DOCUMENTATION

Backend Module structure

PreviousDeployment / DevOpsNextData Model

Last updated 6 years ago

TPM module files structure

export - everything that is related to csv & pdf exports management - specific management commands (in our case there is only one command for updating permissions) migrations - database migrations notifications - templates for email notifications serializers- rest framework serializers - attachments.py - visit attachments serializers - partner.py - tpm partner serializers - visit.py - serializers for visit, activity, - templates - templates to be used in various exports. visit letter & activities pdf export - tests - tests for models, views, serializers, transitions flow - tpmpartners - nested global application to keep shared across the countries information about tpm firm - transitions - everything that is related to fsm transitions - conditions.py - custom checks for transitions (for example in case of submitting report we need to be assured that report attachments exist) - serializers.py - transitions serializers to validate their input arguments (see more in ) - admin.py - admin site definitions for models - apps.py - python app configuration - conditions.py - conditions for permissions framework. - filters.py - rest framework views filters - metadata.py - base metadata class to be used in viewsets. more in - models.py - country-related tpm models - signals.py - app signals. custom logic for user deletion; sending notifications in case of assigning action points - urls.py - app urls - views.py - just set of views to work with models

tpm.tpmpartners app

To store the global data that is related to TPM, nested application named tpmpartners was implemented. Views and serializers are still located in the parent application to keep the consistant place for all module logic.

The App consists of the following parts: - migrations - database migrations - models.py - partner with their staff members - synchronizer.py - VISION partner synchronizer - tasks.py - periodic tasks, which are responsible for keeping the partners synced with the VISION

see more details here
API Metadata section
permissions framework section