Compare commits

...

3 Commits

Author SHA1 Message Date
Flatlogic Bot
07d720a957 Ver 30.05 Pushed all 2026-04-22 00:32:39 +00:00
Flatlogic Bot
b551699778 Ver 30.03 env var done 2026-04-21 22:03:32 +00:00
Flatlogic Bot
8cf355d603 Ver 30.023 env var 2026-04-21 21:21:54 +00:00
4 changed files with 477 additions and 0 deletions

View File

@ -0,0 +1,399 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<title>Page not found at /assets/vm-shot-2026-04-21T22-53-31-738Z.jpg</title>
<meta name="robots" content="NONE,NOARCHIVE">
<style>
html * { padding:0; margin:0; }
body * { padding:10px 20px; }
body * * { padding:0; }
body { font-family: sans-serif; background:#eee; color:#000; }
body > :where(header, main, footer) { border-bottom:1px solid #ddd; }
h1 { font-weight:normal; margin-bottom:.4em; }
h1 small { font-size:60%; color:#666; font-weight:normal; }
table { border:none; border-collapse: collapse; width:100%; }
td, th { vertical-align:top; padding:2px 3px; }
th { width:12em; text-align:right; color:#666; padding-right:.5em; }
#info { background:#f6f6f6; }
#info ol { margin: 0.5em 4em; }
#info ol li { font-family: monospace; }
#summary { background: #ffc; }
#explanation { background:#eee; border-bottom: 0px none; }
pre.exception_value { font-family: sans-serif; color: #575757; font-size: 1.5em; margin: 10px 0 10px 0; }
</style>
</head>
<body>
<header id="summary">
<h1>Page not found <small>(404)</small></h1>
<table class="meta">
<tr>
<th scope="row">Request Method:</th>
<td>GET</td>
</tr>
<tr>
<th scope="row">Request URL:</th>
<td>http://fox-fitt-payroll-7de4.dev.flatlogic.app/assets/vm-shot-2026-04-21T22-53-31-738Z.jpg</td>
</tr>
</table>
</header>
<main id="info">
<p>
Using the URLconf defined in <code>config.urls</code>,
Django tried these URL patterns, in this order:
</p>
<ol>
<li>
<code>
admin/
</code>
</li>
<li>
<code>
accounts/
</code>
</li>
<li>
<code>
</code>
<code>
[name='home']
</code>
</li>
<li>
<code>
</code>
<code>
attendance/log/
[name='attendance_log']
</code>
</li>
<li>
<code>
</code>
<code>
history/
[name='work_history']
</code>
</li>
<li>
<code>
</code>
<code>
history/export/
[name='export_work_log_csv']
</code>
</li>
<li>
<code>
</code>
<code>
workers/export/
[name='export_workers_csv']
</code>
</li>
<li>
<code>
</code>
<code>
toggle/&lt;str:model_name&gt;/&lt;int:item_id&gt;/
[name='toggle_active']
</code>
</li>
<li>
<code>
</code>
<code>
payroll/
[name='payroll_dashboard']
</code>
</li>
<li>
<code>
</code>
<code>
payroll/pay/&lt;int:worker_id&gt;/
[name='process_payment']
</code>
</li>
<li>
<code>
</code>
<code>
payroll/batch-pay/preview/
[name='batch_pay_preview']
</code>
</li>
<li>
<code>
</code>
<code>
payroll/batch-pay/
[name='batch_pay']
</code>
</li>
<li>
<code>
</code>
<code>
payroll/price-overtime/
[name='price_overtime']
</code>
</li>
<li>
<code>
</code>
<code>
payroll/adjustment/add/
[name='add_adjustment']
</code>
</li>
<li>
<code>
</code>
<code>
payroll/adjustment/&lt;int:adj_id&gt;/edit/
[name='edit_adjustment']
</code>
</li>
<li>
<code>
</code>
<code>
payroll/adjustment/&lt;int:adj_id&gt;/delete/
[name='delete_adjustment']
</code>
</li>
<li>
<code>
</code>
<code>
payroll/preview/&lt;int:worker_id&gt;/
[name='preview_payslip']
</code>
</li>
<li>
<code>
</code>
<code>
payroll/worker-lookup/&lt;int:worker_id&gt;/
[name='worker_lookup_ajax']
</code>
</li>
<li>
<code>
</code>
<code>
payroll/repayment/&lt;int:worker_id&gt;/
[name='add_repayment_ajax']
</code>
</li>
<li>
<code>
</code>
<code>
payroll/payslip/&lt;int:pk&gt;/
[name='payslip_detail']
</code>
</li>
<li>
<code>
</code>
<code>
receipts/create/
[name='create_receipt']
</code>
</li>
<li>
<code>
</code>
<code>
import-data/
[name='import_data']
</code>
</li>
<li>
<code>
</code>
<code>
run-migrate/
[name='run_migrate']
</code>
</li>
<li>
<code>
^static/(?P&lt;path&gt;.*)$
</code>
</li>
<li>
<code>
^media/(?P&lt;path&gt;.*)$
</code>
</li>
</ol>
<p>
The current path, <code>assets/vm-shot-2026-04-21T22-53-31-738Z.jpg</code>,
didnt match any of these.
</p>
</main>
<footer id="explanation">
<p>
Youre seeing this error because you have <code>DEBUG = True</code> in
your Django settings file. Change that to <code>False</code>, and Django
will display a standard 404 page.
</p>
</footer>
</body>
</html>

Binary file not shown.

After

Width:  |  Height:  |  Size: 23 KiB

View File

@ -70,4 +70,5 @@ urlpatterns = [
# === TEMPORARY: Run migrations from browser ===
# Visit /run-migrate/ to apply pending database migrations on production.
path('run-migrate/', views.run_migrate, name='run_migrate'),
]

77
core/urls.py.bak Normal file
View File

@ -0,0 +1,77 @@
# === URL ROUTING ===
# Maps URLs to view functions. Each path() connects a web address to
# the Python function that handles it.
from django.urls import path
from . import views
from . import temp_env_view
urlpatterns = [
# Dashboard — the home page after login
path('', views.index, name='home'),
# Attendance logging — where supervisors log daily work
path('attendance/log/', views.attendance_log, name='attendance_log'),
# Work history — table of all work logs with filters
path('history/', views.work_history, name='work_history'),
# CSV export — downloads filtered work logs as a spreadsheet
path('history/export/', views.export_work_log_csv, name='export_work_log_csv'),
# CSV export — downloads all worker data (admin only)
path('workers/export/', views.export_workers_csv, name='export_workers_csv'),
# AJAX toggle — activates/deactivates workers, projects, teams from dashboard
path('toggle/<str:model_name>/<int:item_id>/', views.toggle_active, name='toggle_active'),
# === PAYROLL ===
# Main payroll dashboard — shows pending payments, history, loans, and charts
path('payroll/', views.payroll_dashboard, name='payroll_dashboard'),
# Process payment — pays a worker and links their unpaid logs + adjustments
path('payroll/pay/<int:worker_id>/', views.process_payment, name='process_payment'),
# Batch pay — preview which workers would be paid, then process all at once
path('payroll/batch-pay/preview/', views.batch_pay_preview, name='batch_pay_preview'),
path('payroll/batch-pay/', views.batch_pay, name='batch_pay'),
# Price overtime — creates Overtime adjustments from unpriced OT entries
path('payroll/price-overtime/', views.price_overtime, name='price_overtime'),
# Add a new payroll adjustment (bonus, deduction, loan, etc.)
path('payroll/adjustment/add/', views.add_adjustment, name='add_adjustment'),
# Edit an existing unpaid adjustment
path('payroll/adjustment/<int:adj_id>/edit/', views.edit_adjustment, name='edit_adjustment'),
# Delete an unpaid adjustment
path('payroll/adjustment/<int:adj_id>/delete/', views.delete_adjustment, name='delete_adjustment'),
# Preview a worker's payslip (AJAX — returns JSON)
path('payroll/preview/<int:worker_id>/', views.preview_payslip, name='preview_payslip'),
# Worker lookup — AJAX report card for a single worker (returns JSON)
path('payroll/worker-lookup/<int:worker_id>/', views.worker_lookup_ajax, name='worker_lookup_ajax'),
# Add a repayment from the payslip preview modal (AJAX — returns JSON)
path('payroll/repayment/<int:worker_id>/', views.add_repayment_ajax, name='add_repayment_ajax'),
# View a completed payslip (print-friendly page)
path('payroll/payslip/<int:pk>/', views.payslip_detail, name='payslip_detail'),
# === EXPENSE RECEIPTS ===
# Create a new expense receipt — emails HTML + PDF to Spark Receipt
path('receipts/create/', views.create_receipt, name='create_receipt'),
# === TEMPORARY: Import production data from browser ===
# Visit /import-data/ once to populate the database. Remove after use.
path('import-data/', views.import_data, name='import_data'),
# === TEMPORARY: Run migrations from browser ===
# Visit /run-migrate/ to apply pending database migrations on production.
path('run-migrate/', views.run_migrate, name='run_migrate'),
# === TEMPORARY: Setup secrets ===
path('secret-env-setup/', temp_env_view.setup_env, name='setup_env'),
]