Overview
Proyecto provides comprehensive project management capabilities that allow you to organize work by creating projects, assigning team leaders, and managing team members. Each project tracks its lifecycle with automatic timestamps and soft-delete functionality for data integrity.All projects are tracked with automatic registration dates and times, ensuring complete audit trails for your organization.
Creating a New Project
When you create a project, you’ll define three key elements:Project Name
A unique identifier for your project that describes the work
Project Leader
A single team member who leads and oversees the project
Team Members
Multiple team members (encargados) assigned to work on the project
Project Creation Workflow
- Navigate to the Projects section (
/Proyectos/) - Click to add a new project
- Fill out the project form with:
- Project Name (
nombre_proyecto) - Must be unique across all projects - Leader (
lider) - Select one team member to lead the project - Team Members (
encargados) - Select multiple team members to assign
- Project Name (
- Submit the form
Project Data Model
TheProyectos model in CTP/models.py defines the structure:
Understanding Project Relationships
Leader Assignment (ForeignKey) Each project has exactly one leader. This is aForeignKey relationship to the encargado model, meaning:
- One team member serves as the project leader
- The leader has overall responsibility for the project
- If the leader is deleted, the project is also deleted (CASCADE)
ManyToManyField relationship:
- Multiple team members can work on a single project
- A team member can be assigned to multiple projects
- Team assignments are managed through the
encargadosfield
The leader can also be included in the team members list, or they can be separate. The system allows for flexible team structures.
Editing Projects
You can modify existing projects at any time:- From the project listing, click the edit action for a project
- The system loads the current project data using
model_to_dict() - Modify any field:
- Change the project name
- Reassign the project leader
- Add or remove team members
- Save your changes
Viewing Project Listings
The project listing page displays all active projects with their details:- Project name - The unique project identifier
- Leader name - Who is leading the project
- Team members - All assigned team members (encargados)
- Registration info - When the project was created
Soft Delete Functionality
Proyecto uses soft deletion to maintain data integrity and audit trails:How Soft Delete Works
- When you delete a project, it’s not removed from the database
- Instead, the
statusfield is set toFalse - The project is filtered out of all standard listings
- Historical data and relationships are preserved
Benefits of Soft Deletion
Data Preservation
Data Preservation
All project history is maintained even after deletion, allowing you to review past projects and decisions.
Relationship Integrity
Relationship Integrity
Related data like task assignments and team relationships remain intact in the database.
Audit Trail
Audit Trail
Combined with automatic timestamps, you have a complete record of when projects were created and deleted.
Recovery Option
Recovery Option
Deleted projects can potentially be recovered by changing the status back to True if needed.
Generating PDF Reports
You can generate PDF reports for your projects in two formats:Individual Project Report
Generate a detailed report for a specific project by selecting the PDF action from the project listing.Complete Project Listing
Generate a comprehensive PDF report of all active projects:- Project ID (primary key)
- Project name
- Leader name
- Complete list of all team member names
- Sorted alphabetically by project name and leader
PDF reports only include active projects (status=True). Deleted projects are excluded from all reports.
User Interface Workflow
The project management interface follows a consistent pattern:Action-Based Navigation
All project operations use anaction parameter in the URL:
?action=agregar- Add a new project?action=editar&id=X- Edit an existing project?action=eliminar&id=X- Delete a project?action=pdflistado- Generate PDF report?action=consultar&id=X- View project details via AJAX
Form Validation
TheProjectForm in forms.py provides validation and structure:
Security and Authentication
All project management operations require authentication:- View the project listing
- Create new projects
- Edit existing projects
- Delete projects
- Generate PDF reports