A Django-based boarding house management system for managing tenants, rooms, billing, maintenance, and violations.
Latest Updates (April 27, 2026 - Late Night):
Previous Updates (April 27, 2026 - Evening):
Previous Updates (April 27, 2026 - Morning):
Previous Updates (April 24, 2026):
static/ directory)staticfiles/ with cache-busting (hash versioning).env file - removed from git tracking, added to .gitignore.env.example template for configuration reference.gitignore at project root levelPrevious Updates (March-April 2026):
rents_system/
│
├── manage.py
├── requirements.txt
├── .env ← environment variables (NOT in repo)
├── .env.example ← template for .env configuration
├── .gitignore ← defines what's excluded from git
│
├── static/ ← CENTRALIZED static files (source)
│ ├── js/
│ │ ├── login.js
│ │ ├── login_fixed.js
│ │ ├── dashboard.js
│ │ └── profile-confirmation.js
│ └── css/
│ ├── dashboard.css
│ ├── avatar.css
│ └── modal-fix.css
│
├── staticfiles/ ← AUTO-GENERATED (NOT in repo)
│ ├── js/
│ │ ├── login.js
│ │ ├── login.[hash].js ← versioned for cache-busting
│ │ └── ...
│ └── css/
│ ├── dashboard.css
│ ├── dashboard.[hash].css ← versioned for cache-busting
│ └── ...
│
├── rents_system/ ← project config
│ ├── settings.py
│ ├── urls.py
│ ├── asgi.py
│ └── wsgi.py
│
└── accounts/ ← main app
├── migrations/
├── templates/
│ ├── login.html
│ ├── base_dashboard.html
│ ├── admin/
│ │ ├── dashboard.html
│ │ ├── admin_list.html
│ │ ├── tenant_list.html
│ │ └── room_list.html
│ ├── tenant/
│ │ └── dashboard.html
│ ├── partials/
│ │ ├── avatar.html
│ │ └── sidebar.html
│ └── registration/
│ ├── password_reset_form.html
│ └── ...
│
├── templatetags/
│ ├── __init__.py
│ └── avatar_tags.py
│
├── models.py
├── views.py
├── urls.py
├── admin.py
└── apps.py
auth_user (Django built-in)| Field | Type | Description | |—|—|—| | id | INT | Primary key | | username | VARCHAR | Login username | | password | VARCHAR | Hashed password | | email | VARCHAR | Email address | | is_staff | BOOL | True = Admin | | is_superuser | BOOL | True = Superadmin | | is_active | BOOL | False = Deactivated |
accounts_tenantprofile| Field | Type | Description | |—|—|—| | id | INT | Primary key | | user_id | FK | → auth_user | | full_name | VARCHAR | Full name | | phone | VARCHAR | Phone number | | room_id | FK | → accounts_room | | room_number | VARCHAR | Legacy room number | | photo | IMAGE | Profile photo (optional) | | created_at | DATETIME | Account creation date |
accounts_adminprofile| Field | Type | Description | |—|—|—| | id | INT | Primary key | | user_id | FK | → auth_user | | full_name | VARCHAR | Full name | | phone | VARCHAR | Phone number | | photo | IMAGE | Profile photo (optional) | | created_by_id | FK | → auth_user (Superadmin) | | created_at | DATETIME | Account creation date |
accounts_inclusion| Field | Type | Description | |—|—|—| | id | INT | Primary key | | name | VARCHAR | Inclusion name (unique) | | created_at | DATETIME | Creation timestamp |
accounts_appliance| Field | Type | Description | |—|—|—| | id | INT | Primary key | | name | VARCHAR | Appliance name (unique) | | created_at | DATETIME | Creation timestamp |
accounts_room| Field | Type | Description | |—|—|—| | id | INT | Primary key | | room_number | VARCHAR | Room identifier (A, B, 1, etc.) | | floor | INT | Floor number | | capacity | INT | Max beds | | monthly_rate | DECIMAL | Rent price | | photo | IMAGE | Room photo (optional) | | area | DECIMAL | Area in sqm | | num_cr | INT | Number of CRs | | bed_type | VARCHAR | Single/Double Deck/Both | | has_sink | BOOL | Has sink | | water_included | BOOL | Water included | | electricity_included | BOOL | Electricity included | | has_fan | BOOL | Has fan | | has_aircon | BOOL | Has aircon | | has_ref | BOOL | Has refrigerator | | has_tv | BOOL | Has TV | | has_wifi | BOOL | Has WiFi | | dynamic_inclusions | M2M | → accounts_inclusion | | dynamic_appliances | M2M | → accounts_appliance |
accounts_activitylog| Field | Type | Description | |—|—|—| | id | INT | Primary key | | user_id | FK | → auth_user (nullable) | | action | VARCHAR | Action type (bill_generated, payment_recorded, etc.) | | description | TEXT | Human-readable description | | content_type | VARCHAR | Related model name (e.g., Bill, TenantProfile) | | object_id | INT | ID of related object | | timestamp | DATETIME | When the action occurred |
accounts_bill| Field | Type | Description | |—|—|—| | id | INT | Primary key | | tenant_id | FK | → tenantprofile | | amount | DECIMAL | Bill amount | | due_date | DATE | Due date | | is_paid | BOOL | Payment status | | created_at | DATETIME | Created date |
accounts_maintenancereport| Field | Type | Description | |—|—|—| | id | INT | Primary key | | tenant_id | FK | → tenantprofile | | description | TEXT | Report description | | status | VARCHAR | open / ongoing / completed | | created_at | DATETIME | Submitted date |
accounts_violation| Field | Type | Description | |—|—|—| | id | INT | Primary key | | tenant_id | FK | → tenantprofile | | description | TEXT | Violation description | | date | DATE | Violation date | | created_at | DATETIME | Logged date |
| Role | is_staff | is_superuser | Access |
|---|---|---|---|
| Superadmin | ✅ | ✅ | Full access + Register Admins |
| Admin | ✅ | ❌ | Manage tenants, rooms, billing |
| Tenant | ❌ | ❌ | View own profile, bills, reports |
git clone https://github.com/KevzBueno101/rents_system.git
cd rents_system
pip install -r requirements.txt
.env fileCopy .env.example and fill in your values:
cp .env.example .env
SECRET_KEY=your_secret_key_here
DEBUG=True
DB_NAME=rents_db
DB_USER=root
DB_PASSWORD=
DB_HOST=localhost
DB_PORT=3306
EMAIL_HOST=smtp.gmail.com
EMAIL_PORT=587
EMAIL_USE_TLS=True
EMAIL_HOST_USER=your_email@gmail.com
EMAIL_HOST_PASSWORD=your_app_password
DEFAULT_FROM_EMAIL=your_email@gmail.com
⚠️ IMPORTANT: Never commit .env to git. It should be in .gitignore
CREATE DATABASE rents_db;
python manage.py makemigrations
python manage.py migrate
python manage.py collectstatic --noinput
python manage.py createsuperuser
python manage.py seed_inclusions_appliances
This creates default inclusions (Water, Electricity, Internet, etc.) and appliances (Fan, Air Conditioner, Microwave, etc.)
python manage.py runserver
http://127.0.0.1:8000/
static/ vs staticfiles/static/ directory (source - what you edit)
.js, .css, and other static filesstaticfiles/ directory (generated - production-ready)
python manage.py collectstaticlogin.78bc3e5a20d3.js).gitignore# 1. Edit your static files
nano static/js/login.js
# 2. Collect static files (generates versioned copies)
python manage.py collectstatic --noinput
# 3. Test locally
python manage.py runserver
# 4. Commit changes
git add static/
git commit -m "Update login.js functionality"
git push origin dev
| File | Location | Git Tracked | Purpose |
|---|---|---|---|
.env |
Root | ❌ NO | Your actual secrets (never commit) |
.env.example |
Root | ✅ YES | Template for other developers |
.gitignore |
Root | ✅ YES | Defines what to exclude from git |
.env - always ensure it’s in .gitignore.env.example - provide template for configurationpython manage.py shell -c "from django.core.management.utils import get_random_secret_key; print(get_random_secret_key())".env file with production credentials| Technology | Usage |
|---|---|
| Python 3.12 | Backend language |
| Django 4.2.7 | Web framework |
| MySQL | Database |
| Bootstrap 5.3 | Frontend UI |
| Bootstrap Icons | Icons |
| Pillow | Image handling |
| python-dotenv | Environment variables |
| WhiteNoise | Static files |
| Variable | Description | Example |
|---|---|---|
SECRET_KEY |
Django cryptographic key (keep secure!) | 3ot&+cue4i760gjrayixr!1a3tq_%h#... |
DEBUG |
True (local) / False (production) | True |
DB_NAME |
Database name | rents_db |
DB_USER |
Database user | root |
DB_PASSWORD |
Database password | (leave empty for local dev) |
DB_HOST |
Database host | localhost |
DB_PORT |
Database port | 3306 |
EMAIL_HOST |
SMTP server for emails | smtp.gmail.com |
EMAIL_PORT |
SMTP port | 587 |
EMAIL_USE_TLS |
Use TLS encryption | True |
EMAIL_HOST_USER |
Email account for sending | your_email@gmail.com |
EMAIL_HOST_PASSWORD |
Email app password | (your app password) |
DEFAULT_FROM_EMAIL |
Default “from” email | RENTS System <email@example.com> |
Kevin Bueno — RENTS System
GitHub: @KevzBueno101