This guide walks you through everything needed to get Planta Milenio running on a fresh machine — from system prerequisites to starting the Django development server and creating your first administrator account. The instructions cover both Windows and Linux environments.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.
Verify Prerequisites
Before cloning the repository, confirm that the following are available on your system.Python 3.10 or laterPlanta Milenio targets Python 3.10+ because Django 5 dropped support for older versions.pip (comes bundled with Python 3.10+)GitSQL Server connectivity — confirm that the machine can reach both SQL Server hosts on port 1433. A quick check with Then add the following stanza to The exact
telnet <host> 1433 or Test-NetConnection <host> -Port 1433 (PowerShell) is enough to rule out firewall issues before you go further.FreeTDS (Linux only) — install the development headers and the ODBC bridge:/etc/odbcinst.ini so pyodbc can find the driver:.so path may differ by distribution; run find /usr -name "libtdsodbc.so" if the default path does not match.Clone the Repository
Clone the Planta Milenio source code from GitHub into a directory of your choice.The repository root contains the Django project folder (
proyecto/), the per-app directories, requirements.txt, CreateUser.py, and manage.py.Create a Virtual Environment
Create and activate a dedicated Python virtual environment so that Planta Milenio’s dependencies are isolated from other projects on the same machine.After activation, your prompt will be prefixed with
- Windows
- Linux / macOS
(venv). All subsequent pip and python commands will target this environment.To deactivate later:Install Dependencies
With the virtual environment active, install all Python packages listed in The key packages and their versions are:
The full
requirements.txt:| Package | Version | Purpose |
|---|---|---|
Django | 5.2.4 | Web framework |
gunicorn | 23.0.0 | WSGI server for production deployment |
mssql-django | 1.6 | Django database backend for SQL Server |
pyodbc | 5.3.0 | ODBC bridge used by mssql-django |
weasyprint | 67.0 | HTML-to-PDF rendering for reports and weight tickets |
pillow | 12.0.0 | Image processing (logos and stamps in PDFs) |
requirements.txt may include additional transitive dependencies; the table above lists the direct, application-level ones.Apply Database Migrations
Run Django’s migration command to create all tables in the local SQLite database. This creates You should see a series of
planta.sqlite3 in the project root if it does not already exist.OK lines as each migration is applied. The SQL Server databases (AGRBSS_A and ceres_romana) are queried read-only and are never migrated by this command.Create the First Administrator Account
Planta Milenio ships with a helper script, The script will prompt you interactively for:
CreateUser.py, which is the recommended way to create the initial administrator. Run it from the project root with the virtual environment active:- Username — the login name for the account
- Password — entered twice for confirmation
- Email — contact email stored on the user profile
- Phone — contact phone number stored on the user profile
- Read-only mode — enter
yto create a read-only auditor account, ornfor a full-access administrator
Start the Development Server
Start Django’s built-in development server:By default the server listens on Log in with the administrator account you created in the previous step.
http://127.0.0.1:8000/. Open that address in your browser and you will be redirected to the Planta Milenio login page.To bind to a specific IP address or port — useful when the server machine and the browser are on different hosts on the same LAN:Note: The Django development server is single-threaded and is not suitable for production use. For a production deployment, serve the application with Gunicorn behind a reverse proxy such as Nginx. See the Configuration page forALLOWED_HOSTSandDEBUGsettings that must be changed before going to production.