From b33f69c64dbb1990e23394bf15519bb5a1739c69 Mon Sep 17 00:00:00 2001 From: Flatlogic Bot Date: Wed, 26 Nov 2025 09:12:47 +0000 Subject: [PATCH] firdt --- core/__pycache__/models.cpython-311.pyc | Bin 209 -> 2116 bytes core/__pycache__/urls.cpython-311.pyc | Bin 347 -> 581 bytes core/__pycache__/views.cpython-311.pyc | Bin 1364 -> 2262 bytes core/migrations/0001_initial.py | 29 ++++++ .../__pycache__/0001_initial.cpython-311.pyc | Bin 0 -> 1679 bytes core/models.py | 27 +++++- core/templates/base.html | 3 + core/templates/core/submit_ticket.html | 66 +++++++++++++ core/templates/core/ticket_success.html | 35 +++++++ core/urls.py | 10 +- core/views.py | 45 +++++---- static/css/custom.css | 68 +++++++++++++- staticfiles/css/custom.css | 87 ++++++++++++++---- 13 files changed, 326 insertions(+), 44 deletions(-) create mode 100644 core/migrations/0001_initial.py create mode 100644 core/migrations/__pycache__/0001_initial.cpython-311.pyc create mode 100644 core/templates/core/submit_ticket.html create mode 100644 core/templates/core/ticket_success.html diff --git a/core/__pycache__/models.cpython-311.pyc b/core/__pycache__/models.cpython-311.pyc index 9aa598b9d5171b2bb0d207f045e07f9fbbb95a64..30a48cf1a93915da83f9d5325a9c14d546f9c5d1 100644 GIT binary patch literal 2116 zcmaJ?OK%%h6uvVaKgV`#Hw|r5x9%g6tO`f8QB{emv?L9r5eZV9EKJ2{GWRAKXZ+}$ z8JboR@}dYM1(XG-NEK2*p#(JxFZcmSY${eZ8VT!e5sPk+QCOgE;N0<}jf1$JIddN0 zxsP+cD}NV>gb<9Me;U>Q@F4UXH@d^yQTDHc@(^K!1p^g?oFH&rG{l@JqPGzCJV00? zLLTzl<1uJYdR9)t;yg-wpYdQ?V7@{L6T_UZ-ksj zL`2GWQLsAk<^A0WuxC%|TQlI|gFS>7i-7X=p+bEq|6brRtp5bw_Q=UDBHXnfgYu+n zpj@OcKX@oV>LLcZDSi2|zWfmJV0kaxx68PTN_6MI;$Eb0mq!jEqJ4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GzqX21>4E_zY6>OHV%|KQ~psG^sSNq*On(A~m_R zB)>?%JijQrxF9h(RX;huC{-U~j9x+IFAf_ZyEG@&u80Guoe_wOWr4&8W=2NF8w@fR Ku%RM0pb7xTsWln^ diff --git a/core/__pycache__/urls.cpython-311.pyc b/core/__pycache__/urls.cpython-311.pyc index 1f807fae1897c89361c99c5e868a26d00799b73f..86a2b565d2e321de982fffec75ca153a7d3e2c74 100644 GIT binary patch literal 581 zcmZ`#J8u&~5T5nT`OdjGfiwt-0yjt&Nw$oIq7;ah6j(G@U|nuk$r0Z}ySF4n6mF1G z(!noCg2KO`r8rA2qOBrPrL&YS6}#u70Kx3+W4@XBW@gX3-6b&cV~etFl@Jg6XtS+~Q`IaPZqD;4F(JXU2c=us{X zWf8@k+Lo!Uv01#o^S9HSsWIOXYbM#wEDuY*FApm0O|dt_-WB==d-&<)#cG9vDGp{hsIjW^^x{qR{8fd+DGp~ioO`(1ngn)< Hd#00Lim9KA delta 232 zcmX@ga+|4sIWI340}vcY|CNyiq#uJgFu)3Be6|5HrZc24q%h_%MeMY&-iHyEnd_ZxK+G4NCI~Zlm#4j+Qpbu;eteg!l g9YP%;GuSS$$X{fUzrrH_ftiV)seu~=i+F&V0d;0D%>V!Z diff --git a/core/__pycache__/views.cpython-311.pyc b/core/__pycache__/views.cpython-311.pyc index 6867ddf286a519cf1754ac97038f9f1e4605fbf2..fa583598e05639d9c6c5e2583ecdd00292b0fb2d 100644 GIT binary patch literal 2262 zcmZuy&1)M+6rb4-eXV0zbrZ)S4_ul?;>QoE?xql6r&sBu}5uFz4O<{+Cu#N~K*g_fcRV-XkGD<ODpIZ z9b}E@R;UopgfUXk1R|k(h=i%W3AUfW>r*B|BKJ@xN}|AHBnI3dcp9aQmqKAGrFbDm zi-a;S!YDBr%{wXVMX%X}TH`h=yu_deBcbbNet|l9->lEIW@qOe5Y`bz8B9<{k=|hN zM%h%r7kGWjs6>UGH81Ad66OQ;TADjO0ee)AcNoddZ~A ze01@SrwQM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@o77Gi)1F7x4q2diA^%|t<1canJ0;bb}~blEhN?Mr3rT8;mQF zQ^3SI7hP$1L_T=PE1nr#a3P34Vmeh|O*5<36x{Ly#*dNSGu-1)A3w{qi||4({65DY wGn4=1Y?X {% endif %} {% load static %} + + + {% block head %}{% endblock %} diff --git a/core/templates/core/submit_ticket.html b/core/templates/core/submit_ticket.html new file mode 100644 index 0000000..c0061c8 --- /dev/null +++ b/core/templates/core/submit_ticket.html @@ -0,0 +1,66 @@ +{% extends 'base.html' %} +{% load static %} + +{% block title %}Submit a Ticket{% endblock %} + +{% block head %} + + +{% endblock %} + +{% block content %} +
+
+

Submit a New Ticket

+
+ {% csrf_token %} +
+ {{ form.name.label_tag }} + {{ form.name }} +
+
+ {{ form.email.label_tag }} + {{ form.email }} +
+
+ {{ form.subject.label_tag }} + {{ form.subject }} +
+
+ {{ form.description.label_tag }} + {{ form.description }} +
+ +
+
+
+{% endblock %} diff --git a/core/templates/core/ticket_success.html b/core/templates/core/ticket_success.html new file mode 100644 index 0000000..7978c83 --- /dev/null +++ b/core/templates/core/ticket_success.html @@ -0,0 +1,35 @@ +{% extends 'base.html' %} +{% load static %} + +{% block title %}Ticket Submitted Successfully{% endblock %} + +{% block head %} + + +{% endblock %} + +{% block content %} +
+

Thank You!

+

Your support ticket has been submitted successfully.

+

Your Ticket ID is:

+
{{ ticket.ticket_id }}
+ Back to Home +
+{% endblock %} diff --git a/core/urls.py b/core/urls.py index 6299e3d..8fdc404 100644 --- a/core/urls.py +++ b/core/urls.py @@ -1,7 +1,11 @@ from django.urls import path -from .views import home +from .views import index, submit_ticket, ticket_success + +app_name = 'core' urlpatterns = [ - path("", home, name="home"), -] + path("", index, name="index"), + path("submit/", submit_ticket, name="submit_ticket"), + path("submit/success//", ticket_success, name="ticket_success"), +] \ No newline at end of file diff --git a/core/views.py b/core/views.py index c9aed12..527d924 100644 --- a/core/views.py +++ b/core/views.py @@ -1,25 +1,30 @@ import os -import platform +from django.shortcuts import render, redirect +from django.forms import ModelForm +from .models import Ticket -from django import get_version as django_version -from django.shortcuts import render -from django.utils import timezone +class TicketForm(ModelForm): + class Meta: + model = Ticket + fields = ['name', 'email', 'subject', 'description'] +def index(request): + """Render the landing screen.""" + return render(request, "core/index.html") -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() +def submit_ticket(request): + if request.method == 'POST': + form = TicketForm(request.POST) + if form.is_valid(): + ticket = form.save() + return redirect('core:ticket_success', ticket_id=ticket.id) + else: + form = TicketForm() + return render(request, 'core/submit_ticket.html', {'form': form}) - 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", ""), - } - return render(request, "core/index.html", context) +def ticket_success(request, ticket_id): + try: + ticket = Ticket.objects.get(id=ticket_id) + except Ticket.DoesNotExist: + return redirect('core:index') # Or show a 404 page + return render(request, 'core/ticket_success.html', {'ticket': ticket}) \ No newline at end of file diff --git a/static/css/custom.css b/static/css/custom.css index 925f6ed..ad8e252 100644 --- a/static/css/custom.css +++ b/static/css/custom.css @@ -1,4 +1,70 @@ /* Custom styles for the application */ body { - font-family: system-ui, -apple-system, sans-serif; + font-family: 'Roboto', sans-serif; + background-color: #f8f9fa; } + +/* Form styling */ +.form-container { + max-width: 700px; + margin: 50px auto; + padding: 30px; + background-color: #fff; + border-radius: 8px; + box-shadow: 0 4px 8px rgba(0,0,0,0.1); +} + +.form-container h1 { + font-family: 'Poppins', sans-serif; + font-weight: 700; + margin-bottom: 30px; +} + +.form-label { + font-family: 'Roboto', sans-serif; + font-weight: 500; +} + +.form-control { + border-radius: 0.25rem; +} + +.btn-primary-custom { + background-color: #1A237E; + border-color: #1A237E; + font-family: 'Roboto', sans-serif; + font-weight: 500; + padding: 10px 25px; + color: #fff; +} + +.btn-primary-custom:hover { + background-color: #0D1241; + border-color: #0D1241; + color: #fff; +} + +/* Helper to apply bootstrap form-control styles to our form fields */ +input[type="text"], +input[type="email"], +textarea { + display: block; + width: 100%; + padding: .375rem .75rem; + font-size: 1rem; + font-weight: 400; + line-height: 1.5; + color: #212529; + background-color: #fff; + background-clip: padding-box; + border: 1px solid #ced4da; + -webkit-appearance: none; + -moz-appearance: none; + appearance: none; + border-radius: .25rem; + transition: border-color .15s ease-in-out,box-shadow .15s ease-in-out; +} + +textarea { + min-height: 150px; +} \ No newline at end of file diff --git a/staticfiles/css/custom.css b/staticfiles/css/custom.css index 108056f..ad8e252 100644 --- a/staticfiles/css/custom.css +++ b/staticfiles/css/custom.css @@ -1,21 +1,70 @@ - -: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); -} +/* Custom styles for the application */ body { - margin: 0; - 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; + font-family: 'Roboto', sans-serif; + background-color: #f8f9fa; } + +/* Form styling */ +.form-container { + max-width: 700px; + margin: 50px auto; + padding: 30px; + background-color: #fff; + border-radius: 8px; + box-shadow: 0 4px 8px rgba(0,0,0,0.1); +} + +.form-container h1 { + font-family: 'Poppins', sans-serif; + font-weight: 700; + margin-bottom: 30px; +} + +.form-label { + font-family: 'Roboto', sans-serif; + font-weight: 500; +} + +.form-control { + border-radius: 0.25rem; +} + +.btn-primary-custom { + background-color: #1A237E; + border-color: #1A237E; + font-family: 'Roboto', sans-serif; + font-weight: 500; + padding: 10px 25px; + color: #fff; +} + +.btn-primary-custom:hover { + background-color: #0D1241; + border-color: #0D1241; + color: #fff; +} + +/* Helper to apply bootstrap form-control styles to our form fields */ +input[type="text"], +input[type="email"], +textarea { + display: block; + width: 100%; + padding: .375rem .75rem; + font-size: 1rem; + font-weight: 400; + line-height: 1.5; + color: #212529; + background-color: #fff; + background-clip: padding-box; + border: 1px solid #ced4da; + -webkit-appearance: none; + -moz-appearance: none; + appearance: none; + border-radius: .25rem; + transition: border-color .15s ease-in-out,box-shadow .15s ease-in-out; +} + +textarea { + min-height: 150px; +} \ No newline at end of file