From 7cfd0453a755c68a61284817c96bfe054a5eeb3f Mon Sep 17 00:00:00 2001 From: Flatlogic Bot Date: Sun, 11 Jan 2026 15:59:07 +0000 Subject: [PATCH] Version 1.0 --- core/__pycache__/admin.cpython-311.pyc | Bin 212 -> 855 bytes core/__pycache__/models.cpython-311.pyc | Bin 209 -> 2066 bytes core/__pycache__/urls.cpython-311.pyc | Bin 347 -> 390 bytes core/__pycache__/views.cpython-311.pyc | Bin 1364 -> 2126 bytes core/admin.py | 8 +- core/migrations/0001_initial.py | 28 +++ .../__pycache__/0001_initial.cpython-311.pyc | Bin 0 -> 1686 bytes core/models.py | 28 ++- core/templates/base.html | 73 +++++-- core/templates/core/index.html | 205 ++++++------------ core/urls.py | 7 +- core/views.py | 58 +++-- static/css/custom.css | 99 ++++++++- staticfiles/css/custom.css | 114 ++++++++-- 14 files changed, 418 insertions(+), 202 deletions(-) create mode 100644 core/migrations/0001_initial.py create mode 100644 core/migrations/__pycache__/0001_initial.cpython-311.pyc diff --git a/core/__pycache__/admin.cpython-311.pyc b/core/__pycache__/admin.cpython-311.pyc index cd6f855b12f4883b1ba9de01c54245c53aacd714..7d809905f697135fc5183a94e4d90f31abc077ec 100644 GIT binary patch literal 855 zcmZWny>8S%5Z<-VzTG6v3%aiWpn;Hc5OnaT;u`L zpuE8$l!~{Y3{r~IR*|UEU365bn6=}eQ)YL^^NnY}o!Qy%y0>fSpkcAa;X^+*&hNCLKNPHqfsBW+(d9ffOwP<&tTLunc+2< z=~=9Sv=-9Zs#7t%(yR#knFzuOPsVcYXg;9z;4(jUp~HpK&>jfxVWDb@8;{zi?{O!lVWGy9~N))5F7O-UC$cZ50Y`Z9i~Yp_(^GQQC-MOq1&(Df;>RAFe#;T^5krF&dKAm)p>r{*7fK6rT0^KXDf9jT4|0s{{u}G?qexK&jf&kU-iJP?JJyRb6d%Cdnr2wVBYe~!hX2am1xn5mO0BvXl+_8jm`^bLWxrEx*;y4Da?s9^cWvUP@!)JU>s7Q3I>T^!$ zvL}EoQltfi7zV*kJbr^{vj)qSdO4V#FXTzqnz3}#%90yIvCIO^eqEr8Mp0HsRw+=D_2zc4c+&|< zl3`LwDs_342OD|K*L5gL)Iu9~W>8Kq?71l#OMa5k<3E2BR;1iRx<9r+{u zHL=$g`<{vePsD+$c)}J>ERX#z#8-yDE8Qurp8fvz^6gsh;Z^xTcy0fKjy1CJ;X`$c zd#F`=ho1JFdD3&H+B0JJj8yiG)Dpd``|qA!J$rZLX`=5*qOY1r+lh3gGhGwn%LY9J zr6)59CoH)jCCQ0O5)7cF5s*72>6#^LY?49inwma4{n?Z>dg0Q<=-3ox$Kyms=Vdys z5)IQ7)1zZ~S=C&F)7bz^n2GkVWnt%jcvjW`Cuo?mX&FvfHVk!6C&Y=JlT9+M=82an z24O_KPOyZ*P7ku6FuYsf5X_tO7^uG>7mM3{%Er=VY>UQUz{;&p-RDmRq00?co~(DG z#L<sl@gX}tRQ|Y@=vz5uHyc*|q}F|G<%->XY%5Xe9UBO52T@NZ&87_SQBwlH44P!o@@jN9VzsyJYa1Lcc#KNt9jtD{{!h=N^p zUoeoUBVf;XP?tX6F}PN*C#)TlFwPOYAnS95K|JG~UEm`7hxEF2lC_LYgWJKE;di|u sc#oa}8@n6EMPPNF6IWI340}!mp_?2M^q#uJgFu(+5d=>&SrZc24q%h_%Y=G)Yb5iY! aIDle|KwK<4c`v&Z_XP$SASz-5iU0rw6(F+! diff --git a/core/__pycache__/urls.cpython-311.pyc b/core/__pycache__/urls.cpython-311.pyc index 1f807fae1897c89361c99c5e868a26d00799b73f..c61ea0b08f71124613c0740fda093447c225dbf1 100644 GIT binary patch delta 274 zcmcc3)W*!aoR^o20SKm^NY1RE$ScX{HBnu*K7}QUg^3}RF@-giIg1q}4+1G{YuJ}D zGcc?MVhBiQjABdS2xidadvkXVxOk`cmTEz3+TFTTZ+oL`iBi{Tb)W?o8a z1xQg|Vs5IRCi^Y!l&r+O^nAV2qMYI)kf}xNAVL6SiHf`WLE$|8=5>jRPnfMOtX zivxkg2WCb_#v2SW7f{g+2H^{+=mEE21IGt823F1nmkyzh(4OcS$d_YqHk>W-2 delta 229 zcmZo;zRkqDoR^o20SFGH|H{ak$ScWcGf`c(o{1rqF@+_SIfZo%+cIVbhSfj}0qKlU zEGg{444ND-K?0hLw^#}iOEO+ELOB`vxv94piddoCyu{p8KTXzK+$mX!dFlCjrA0Z# zMIgg&v6f|~mKTE+-r@!d15GJOEy^oi$?%zB;&U4=KA<9yp~YU4bs42B9x#YsKt&(e m7+5(QTsnk0LT0dCV3EJbB7cQN{sS`;KT`uY2o~`GwF3YK7(567 diff --git a/core/__pycache__/views.cpython-311.pyc b/core/__pycache__/views.cpython-311.pyc index 6867ddf286a519cf1754ac97038f9f1e4605fbf2..d947244c999051939923e13e72131954ec501a40 100644 GIT binary patch literal 2126 zcmb_d&1)M+6ra`SN^7t3WjnTIcjHoARrU&hI}nE^*bW$y8hi*CidpXr_A2|K&aC{g zIN(E%IrLIO!H1mO7Q6pLk3Gsp;AJ2XC_T6*l{A-}`bPee>IO>Pr`b2}&AfT@oA+j( zzHeEi+7TzZ7zG*Om>qNCi}AV~ zw-bvAocJ0oCUJZL<&ww3O-|woN?c6nv2?1=8`LB=Ovt|Fkic`v6I0BcQ7Z^h_};z( zATN=BHV%F9+)m70rd=4?J0E7he_*Zfeu=Oo4u@knjuSZPr!EYN@iV#Ezb}xUQZacZ zVR=8b3pn@Au?7(8{q(L3WAL4j^r3V8Gd2ac;8v{S48Df1Ujf^V{hR+gwp+Ljx8n|c z8+YQaD`4xsQrylXdlq5QH|OhBLryQOaJD%j&!sI1_u$^0$n%Kbc44=L@JCybUC7Vg zd5++kYfl1s&Rcc0X^#ZAiXiFOBcGEE!ztNBH$5jv&lxV!797i84cdz!>rBXvHe8vT z9vU7Q9UGsRyvvg%crli{5~RN<5o-7z)rM#cpunSvVPli!WUjFKt6FjmhwzqDg*b*~ zbCnX)Dp|z!Pi8Y0`iVitr-u0qHdu1Y&N87q!F;|a21G0}rV zh%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a/core/models.py +++ b/core/models.py @@ -1,3 +1,29 @@ from django.db import models -# Create your models here. +class Parcel(models.Model): + STATUS_CHOICES = [ + ('pending', 'Pending'), + ('processed', 'Processed'), + ('rejected', 'Rejected'), + ] + + sender_name = models.CharField(max_length=255) + sender_email = models.EmailField() + recipient_name = models.CharField(max_length=255) + recipient_email = models.EmailField() + tracking_number = models.CharField(max_length=100, unique=True) + status = models.CharField(max_length=20, choices=STATUS_CHOICES, default='pending') + assignee = models.CharField(max_length=100, blank=True, null=True) + received_date = models.DateTimeField() + + def __str__(self): + return f"Parcel {self.tracking_number} for {self.recipient_name}" + + @property + def sender_initials(self): + if self.sender_name: + parts = self.sender_name.split() + if len(parts) > 1: + return (parts[0][0] + parts[-1][0]).upper() + return parts[0][0].upper() + return "?" \ No newline at end of file diff --git a/core/templates/base.html b/core/templates/base.html index 1e7e5fb..fc9862a 100644 --- a/core/templates/base.html +++ b/core/templates/base.html @@ -1,25 +1,60 @@ - - - {% block title %}Knowledge Base{% endblock %} - {% if project_description %} - - - - {% endif %} - {% if project_image_url %} - - - {% endif %} - {% load static %} - - {% block head %}{% endblock %} + + + {% block title %}PelipostPRO{% endblock %} + + + + + + + + + + + {% load static %} + + + + {% if project_description %} + + + + {% endif %} + {% if project_image_url %} + + + {% endif %} + + + - - {% block content %}{% endblock %} +
+ {% block content %} + + {% endblock %} +
+ + + - - + \ No newline at end of file diff --git a/core/templates/core/index.html b/core/templates/core/index.html index faec813..c2ad44c 100644 --- a/core/templates/core/index.html +++ b/core/templates/core/index.html @@ -1,145 +1,72 @@ {% extends "base.html" %} +{% load static %} -{% block title %}{{ project_name }}{% endblock %} - -{% block head %} - - - - +{% block title %} + {{ page_title }} - PelipostPRO {% endblock %} {% block content %} -
-
-

Analyzing your requirements and generating your app…

-
- Loading… -
-

AppWizzy AI is collecting your requirements and applying the first changes.

-

This page will refresh automatically as the plan is implemented.

-

- Runtime: Django {{ django_version }} · Python {{ python_version }} - — UTC {{ current_time|date:"Y-m-d H:i:s" }} -

+
+
+

Mail Portal

+ Add Parcel
-
-
- Page updated: {{ current_time|date:"Y-m-d H:i:s" }} (UTC) -
-{% endblock %} \ No newline at end of file + +
+
+
+ + + + + + + + + + + + + {% for parcel in parcels %} + + + + + + + + + {% empty %} + + + + {% endfor %} + +
SenderRecipientTracking #StatusAssigneeReceived
+
+
{{ parcel.sender_initials }}
+
+
{{ parcel.sender_name }}
+
{{ parcel.sender_email }}
+
+
+
+
{{ parcel.recipient_name }}
+
{{ parcel.recipient_email }}
+
{{ parcel.tracking_number }} + {% if parcel.status == 'processed' %} + Processed + {% elif parcel.status == 'rejected' %} + Rejected + {% else %} + Pending + {% endif %} + {{ parcel.assignee }}{{ parcel.received_date|date:"M d, Y, P" }}
+
No parcels found.
+

Click "Add Parcel" to get started.

+
+
+
+
+ +{% endblock %} diff --git a/core/urls.py b/core/urls.py index 6299e3d..cedf1bd 100644 --- a/core/urls.py +++ b/core/urls.py @@ -1,7 +1,8 @@ from django.urls import path +from . import views -from .views import home +app_name = 'core' urlpatterns = [ - path("", home, name="home"), -] + path('', views.index, name='index'), +] \ No newline at end of file diff --git a/core/views.py b/core/views.py index c9aed12..29407ed 100644 --- a/core/views.py +++ b/core/views.py @@ -1,25 +1,45 @@ -import os -import platform - -from django import get_version as django_version from django.shortcuts import render +from .models import Parcel from django.utils import timezone +import datetime +def index(request): + # If no parcels, create some demo data. + if not Parcel.objects.exists(): + Parcel.objects.create( + sender_name='John Doe', + sender_email='john.doe@example.com', + recipient_name='Jane Smith', + recipient_email='jane.smith@example.com', + tracking_number='JD123456789', + status='pending', + assignee='Operator 1', + received_date=timezone.now() - datetime.timedelta(days=1) + ) + Parcel.objects.create( + sender_name='Peter Jones', + sender_email='peter.jones@example.com', + recipient_name='Mary Williams', + recipient_email='mary.williams@example.com', + tracking_number='PJ987654321', + status='processed', + assignee='Admin', + received_date=timezone.now() - datetime.timedelta(hours=5) + ) + Parcel.objects.create( + sender_name='Susan Brown', + sender_email='susan.brown@example.com', + recipient_name='David Miller', + recipient_email='david.miller@example.com', + tracking_number='SB112233445', + status='rejected', + assignee='Operator 2', + received_date=timezone.now() - datetime.timedelta(days=2) + ) -def home(request): - """Render the landing screen with loader and environment details.""" - host_name = request.get_host().lower() - agent_brand = "AppWizzy" if host_name == "appwizzy.com" else "Flatlogic" - now = timezone.now() - + parcels = Parcel.objects.all().order_by('-received_date') context = { - "project_name": "New Style", - "agent_brand": agent_brand, - "django_version": django_version(), - "python_version": platform.python_version(), - "current_time": now, - "host_name": host_name, - "project_description": os.getenv("PROJECT_DESCRIPTION", ""), - "project_image_url": os.getenv("PROJECT_IMAGE_URL", ""), + 'parcels': parcels, + 'page_title': 'Mail Screening Portal' } - return render(request, "core/index.html", context) + return render(request, 'core/index.html', context) \ No newline at end of file diff --git a/static/css/custom.css b/static/css/custom.css index 925f6ed..1e04186 100644 --- a/static/css/custom.css +++ b/static/css/custom.css @@ -1,4 +1,99 @@ -/* Custom styles for the application */ +/* General Body and Typography */ body { - font-family: system-ui, -apple-system, sans-serif; + background-color: #F3F4F6; /* Cool Gray 100 */ + font-family: 'Inter', sans-serif; + color: #1F2937; /* Cool Gray 800 */ } + +h1, h2, h3, h4, h5, h6 { + font-weight: 700; +} + +.btn-primary { + background-color: #4F46E5; + border-color: #4F46E5; + font-weight: 600; + transition: background-color 0.2s; +} + +.btn-primary:hover { + background-color: #4338CA; + border-color: #4338CA; +} + +/* Avatars */ +.avatar { + display: inline-flex; + align-items: center; + justify-content: center; + width: 2.5rem; + height: 2.5rem; + border-radius: 50%; + font-weight: 600; + color: #fff; + background-color: #A5B4FC; /* Indigo 300 */ +} + +.avatar-indigo { + background-color: #818CF8; + color: #3730A3; +} + + +/* Status Pills */ +.status-pill { + padding: 0.3em 0.8em; + font-size: 0.75rem; + font-weight: 600; + border-radius: 9999px; +} + +.status-pending { + color: #92400E; /* Amber 800 */ + background-color: #FDE68A; /* Amber 200 */ +} + +.status-processed { + color: #065F46; /* Emerald 800 */ + background-color: #A7F3D0; /* Emerald 200 */ +} + +.status-rejected { + color: #991B1B; /* Red 800 */ + background-color: #FECACA; /* Red 200 */ +} + +/* Table styling */ +.table { + border-collapse: separate; + border-spacing: 0; + min-width: 800px; +} + +.table thead th { + border-bottom-width: 1px; + font-weight: 600; + text-transform: uppercase; + font-size: 0.75rem; + letter-spacing: 0.05em; + color: #6B7280; /* Cool Gray 500 */ +} + +.table tbody tr { + transition: background-color 0.15s ease-in-out; +} + +.table tbody tr:hover { + background-color: #F9FAFB; /* Cool Gray 50 */ +} + +.table td, .table th { + vertical-align: middle; + padding-top: 1rem; + padding-bottom: 1rem; + border-bottom: 1px solid #E5E7EB; /* Cool Gray 200 */ +} + +.card { + border: none; +} \ No newline at end of file diff --git a/staticfiles/css/custom.css b/staticfiles/css/custom.css index 108056f..1e04186 100644 --- a/staticfiles/css/custom.css +++ b/staticfiles/css/custom.css @@ -1,21 +1,99 @@ - -:root { - --bg-color-start: #6a11cb; - --bg-color-end: #2575fc; - --text-color: #ffffff; - --card-bg-color: rgba(255, 255, 255, 0.01); - --card-border-color: rgba(255, 255, 255, 0.1); -} +/* General Body and Typography */ body { - margin: 0; + background-color: #F3F4F6; /* Cool Gray 100 */ font-family: 'Inter', sans-serif; - background: linear-gradient(45deg, var(--bg-color-start), var(--bg-color-end)); - color: var(--text-color); - display: flex; - justify-content: center; - align-items: center; - min-height: 100vh; - text-align: center; - overflow: hidden; - position: relative; + color: #1F2937; /* Cool Gray 800 */ } + +h1, h2, h3, h4, h5, h6 { + font-weight: 700; +} + +.btn-primary { + background-color: #4F46E5; + border-color: #4F46E5; + font-weight: 600; + transition: background-color 0.2s; +} + +.btn-primary:hover { + background-color: #4338CA; + border-color: #4338CA; +} + +/* Avatars */ +.avatar { + display: inline-flex; + align-items: center; + justify-content: center; + width: 2.5rem; + height: 2.5rem; + border-radius: 50%; + font-weight: 600; + color: #fff; + background-color: #A5B4FC; /* Indigo 300 */ +} + +.avatar-indigo { + background-color: #818CF8; + color: #3730A3; +} + + +/* Status Pills */ +.status-pill { + padding: 0.3em 0.8em; + font-size: 0.75rem; + font-weight: 600; + border-radius: 9999px; +} + +.status-pending { + color: #92400E; /* Amber 800 */ + background-color: #FDE68A; /* Amber 200 */ +} + +.status-processed { + color: #065F46; /* Emerald 800 */ + background-color: #A7F3D0; /* Emerald 200 */ +} + +.status-rejected { + color: #991B1B; /* Red 800 */ + background-color: #FECACA; /* Red 200 */ +} + +/* Table styling */ +.table { + border-collapse: separate; + border-spacing: 0; + min-width: 800px; +} + +.table thead th { + border-bottom-width: 1px; + font-weight: 600; + text-transform: uppercase; + font-size: 0.75rem; + letter-spacing: 0.05em; + color: #6B7280; /* Cool Gray 500 */ +} + +.table tbody tr { + transition: background-color 0.15s ease-in-out; +} + +.table tbody tr:hover { + background-color: #F9FAFB; /* Cool Gray 50 */ +} + +.table td, .table th { + vertical-align: middle; + padding-top: 1rem; + padding-bottom: 1rem; + border-bottom: 1px solid #E5E7EB; /* Cool Gray 200 */ +} + +.card { + border: none; +} \ No newline at end of file