Planta Milenio is a full-stack Django 5 web application built to manage day-to-day operations at an industrial plant. It connects a local SQLite database with two external SQL Server instances (Profit ERP and Ceres Romana) to give operators a unified control panel for tracking purchase orders, vehicle movements, visitor access, and audit trails — all from a browser.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/JuanDiego3030/Planta_Milenio/llms.txt
Use this file to discover all available pages before exploring further.
Installation
Set up Python, the virtual environment, and all dependencies in minutes.
Configuration
Connect your SQL Server databases and configure Django settings.
User Management
Create admin users, assign module permissions, and manage access levels.
Core Features
Explore raw-material intake, personnel access, audit, and report views.
Data Models
Understand the underlying models: users, order history, and visitor records.
API Reference
JSON autocomplete endpoints and PDF report download routes.
How it works
Install and configure
Clone the repository, create a virtual environment, install dependencies from
requirements.txt, and point the DATABASES setting at your SQL Server instances.Create your first admin user
Run
CreateUser.py from the project root to bootstrap the initial credentials — no Django admin panel required.Log in and assign permissions
Sign in at
/login/, navigate to Usuarios, and grant each operator access only to the modules they need (permiso_control, permiso_reportes, etc.).Key capabilities
Raw Material Intake
Validate purchase orders against the Profit ERP and register vehicle entries in the local history log.
Personnel Access
Log visitor entry and exit with ID, company, host, and visit duration — approve or deny in one click.
Transport Audit
Browse and edit
orden_profit_transporte records from Ceres Romana, with inline search and pagination.PDF Reports
Generate dated PDF exports for both material intake and personnel access using WeasyPrint.
Role-Based Access
Fine-grained boolean permissions per module plus a read-only
solo_consulta mode for auditors.Autocomplete APIs
AJAX-driven autocomplete endpoints for companies, drivers, vehicles, products, and visitors.