From 8f822e36b646ba54797f7cb5c27ffa90b32ea451 Mon Sep 17 00:00:00 2001 From: Flatlogic Bot Date: Sun, 30 Nov 2025 16:45:49 +0000 Subject: [PATCH] 2.0 --- .env | 5 + core/__pycache__/admin.cpython-311.pyc | Bin 212 -> 816 bytes core/__pycache__/forms.cpython-311.pyc | Bin 0 -> 1274 bytes core/__pycache__/models.cpython-311.pyc | Bin 209 -> 1283 bytes core/__pycache__/urls.cpython-311.pyc | Bin 347 -> 348 bytes core/__pycache__/views.cpython-311.pyc | Bin 1364 -> 1021 bytes core/admin.py | 8 +- core/forms.py | 13 ++ core/migrations/0001_initial.py | 26 +++ .../__pycache__/0001_initial.cpython-311.pyc | Bin 0 -> 1401 bytes .../__pycache__/__init__.cpython-311.pyc | Bin 168 -> 168 bytes core/models.py | 11 +- core/templates/base.html | 13 +- core/templates/core/index.html | 189 +++++------------- core/urls.py | 7 +- core/views.py | 33 ++- static/css/custom.css | 107 +++++++++- staticfiles/css/custom.css | 118 +++++++++-- 18 files changed, 342 insertions(+), 188 deletions(-) create mode 100644 .env create mode 100644 core/__pycache__/forms.cpython-311.pyc create mode 100644 core/forms.py create mode 100644 core/migrations/0001_initial.py create mode 100644 core/migrations/__pycache__/0001_initial.cpython-311.pyc diff --git a/.env b/.env new file mode 100644 index 0000000..f7bc2e2 --- /dev/null +++ b/.env @@ -0,0 +1,5 @@ +DB_NAME=flatlogic_django +DB_USER=ubuntu +DB_PASS=ubuntu +DB_HOST=127.0.0.1 +DB_PORT=3306 diff --git a/core/__pycache__/admin.cpython-311.pyc b/core/__pycache__/admin.cpython-311.pyc index cd6f855b12f4883b1ba9de01c54245c53aacd714..de82fa3b2207ab7ac09c7ae76034e2e3c43883c4 100644 GIT binary patch literal 816 zcmZWm&2G~`5T3Q;BuyI%rOgFVK~Rw_(HaSf6GB29I6&c0!NHf+#=B`;)^=FiqPbb9 z?@*o~2=!%x)I+qVN}PI26;3@d>(rI1&hE~Bvp@6A&#!j71t`zev+xH2_-l+x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-$M6 z{HSgcs@c`9JJ^J-asC~YJw#E3Bd8LIAj&s-K1ll^as90!S1C^vm;u)%>NfO8y^0RZM;iy$- zwYjF(ZM$w7rvzRGev-PngEeZbI~!#%#WhVeHczjD^Yk-AM64KWRy;&YYSS^XVQyoU zkZPY9aI&$nA)Ma>v4@_b2JGQF04~AqqYwL?_7H3*18g6l*F4nDuk7;q>HKb7el#uX z(=t(bKT&IH8a7m&`pK$ARfiI+I)2=CteR8TDfA)ORIAx6W&U@exMAwF*j#HGPP0gN zXcd~Uirc2OX>X}jTCAEDEr#DoVe5$>!x$oAyqmkgTA}M2g246-5G~Xh8GTuBhnL|# zEWg2D?ylYckoW@g%%880)_ zTIxvS&lfyt{BYitl(wXJlF}-5q%n3l_AcT|Q*CL=lcwM>r|geLrWmp2~#~=<2FhLogg@BCd3@HpLj5!Rsj8Tk?3@J>(44TX@K?*b( zZ?Wa(r=;c-`)M-W;!Md(%uCPLOGzqX21>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..d7352050482880a570db676d1515243146a14235 100644 GIT binary patch delta 88 zcmcc3bccy|IWI340}%W#(#g!8$Xme1nwgi9S~0O{p~Vdbi3_Oc0~-S?XM;EjX$vpwyN3BENVhEW)jBKS;92G9-06F2hVXYyxm46G#6HY#C$-E zzO#MAxd9@ii>h#@*6LQqCH(yYGCYA$6~bC8rNe;ZTj_IrtLj_{8@L>?<*+{j6?DE7sY1_Mt1k#GOnCgOmy=V@BY?gjR5SXO z*OpC*axSf+D*Jo({+>b#MQa&$wMaCDIhwY=%TgZy9wzZo)+|cW225%xm9x!!GUkaU zv2&JA{bA4;I4@?fw?#E?=pN6Y3H2}UMg2}NMCy}Da$b~@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f_w9L< zIJbYby>RVisS{uA##h^s)e}e(07x&wM(2TX`E06G0Q9V<>X{|ul?i3g0?%(HPYlgf z1`zb;;Me{qqL;+gPk@~&H*I26ExbmrfGYk1-V9>luI0i7Vi$pf#;Mc>O;A8afodTr-ASg+AN7uM z>`op!bj((dom>>r;L&47k0*eGa8rOz+7vibfEK-@B)7Hw$a{Q0-@W(v?vcNzQgI;Y zJGx^05CGs$smv)f6D}VJ;a7kFf+nzF6Ix1Bfj|LufRvvB3ShV=_D<=Zj>_x9E5J40~p+WdGD9R9PN*x77d}M5HLD50%ROEOm))gl1WBi6ln~0SdBu^EA z5^G8#QtDcygTL$PM-7Ur=|-!y%3j6{iLC{9>E)J$x5-CZ8SmTs8izokdvp_ZxJ z`$QEQ5A}8(8;>(mUhFu;@@GObY!?$u-SLHVL@Z3H-o<4|?n*sAt4-5gk!V`3?L60X zghcqDUr@MXU=z`2U&$ApnRoD^I~7xpMJsm<3(rta z56_1G4{#|0f_D$AyN-pc{Z`+0`&E31+af%vK6l7I?dfe?Z94>4|NUsHYinzti8lE~ zulA0J{1|*D1^Sm@$5+?ug~j9gBnUI%<8LQX5G(!?_o9VSdg*og9?Mo<9C+EvdGKP1 zH8o}vmZifi^|F+y?kJsSh1HXeS6Ds&kQKIug)OhJ#ngwR^!qHgeDblETRvNQwa#+& zVXp4w>P-FGcU7dTa@JzG&0%iS%WX3Ci&6R`R=WS&fmgbJjxH!GHHM{zS86bIXOzyd z{K`qq%deb$&hi_>{Dzm`VCv>5{Q)bkpB#9_^;a2ItPP7buUKPheR3z7S(tL22?V`T~RvCBew7kx0Dk1g`4P~|Uy nelOT003n=&0W34{$<2Eb&cN^l++;7}p1Sl#I^N#m_4ED%7|eN6 literal 0 HcmV?d00001 diff --git a/core/migrations/__pycache__/__init__.cpython-311.pyc b/core/migrations/__pycache__/__init__.cpython-311.pyc index 58b1c14eb06fea9cfb9a0d59788218572a75b51c..49f9fe9489b053995d345bb8a4c4644975dd95e3 100644 GIT binary patch delta 20 acmZ3%xPp;qIWI340}uoh>ts&knF9bXQ3SgH delta 20 acmZ3%xPp;qIWI340}vQ{e#)50GY0@MWCb|@ diff --git a/core/models.py b/core/models.py index 71a8362..d4f8313 100644 --- a/core/models.py +++ b/core/models.py @@ -1,3 +1,12 @@ from django.db import models -# Create your models here. +class ContactSubmission(models.Model): + full_name = models.CharField(max_length=100) + email = models.EmailField(blank=True) + phone = models.CharField(max_length=20) + formation_interest = models.CharField(max_length=200, blank=True) + message = models.TextField(blank=True) + created_at = models.DateTimeField(auto_now_add=True) + + def __str__(self): + return f"{self.full_name} - {self.created_at.strftime('%Y-%m-%d')}" \ No newline at end of file diff --git a/core/templates/base.html b/core/templates/base.html index 1e7e5fb..93ac166 100644 --- a/core/templates/base.html +++ b/core/templates/base.html @@ -3,7 +3,17 @@ - {% block title %}Knowledge Base{% endblock %} + + {% block title %}Institut ITM{% endblock %} + + + + + + + + + {% if project_description %} @@ -20,6 +30,7 @@ {% block content %}{% endblock %} + diff --git a/core/templates/core/index.html b/core/templates/core/index.html index faec813..d493519 100644 --- a/core/templates/core/index.html +++ b/core/templates/core/index.html @@ -1,145 +1,52 @@ -{% extends "base.html" %} +{% extends 'base.html' %} +{% load static %} -{% block title %}{{ project_name }}{% endblock %} - -{% block head %} - - - - -{% endblock %} +{% block title %}Accueil - Institut ITM{% endblock %} {% block content %} -
-
-

Analyzing your requirements and generating your app…

-
- Loading… +
+
+ +

Institut ITM de Formation

+

Votre avenir professionnel commence ici. Des formations d'excellence pour un succès garanti.

-

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" }} -

-
-
-
- Page updated: {{ current_time|date:"Y-m-d H:i:s" }} (UTC) -
-{% endblock %} \ No newline at end of file + + +
+ {% if messages %} + {% for message in messages %} + + {% endfor %} + {% endif %} + +
+
+

Contactez-Nous

+

Une question ? Un projet ? N'hésitez pas à nous contacter. Notre équipe est à votre disposition pour vous orienter et vous accompagner.

+ +
+

Adresse (Ouled Fayet): Villa N° 12, Cité 150 Logements, El Achour, Alger

+

Adresse (Draria): Rue Benchabane Mouloud, Draria 16050

+

Téléphone: +213 660 64 85 47

+

Email: oguernouti@institut-itm.com

+
+
+
+
+
+ {% csrf_token %} + {% for field in form %} +
+ {{ field }} +
+ {% endfor %} + +
+
+
+
+
+{% endblock %} diff --git a/core/urls.py b/core/urls.py index 6299e3d..34bd639 100644 --- a/core/urls.py +++ b/core/urls.py @@ -1,7 +1,6 @@ from django.urls import path - -from .views import home +from .views import index urlpatterns = [ - path("", home, name="home"), -] + path("", index, name="index"), +] \ No newline at end of file diff --git a/core/views.py b/core/views.py index c9aed12..12e2131 100644 --- a/core/views.py +++ b/core/views.py @@ -1,25 +1,18 @@ -import os -import platform - -from django import get_version as django_version from django.shortcuts import render -from django.utils import timezone +from .forms import ContactForm +from django.contrib import messages - -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 index(request): + if request.method == 'POST': + form = ContactForm(request.POST) + if form.is_valid(): + form.save() + messages.success(request, 'Merci! Votre message a été envoyé avec succès.') + form = ContactForm() # Clear form + else: + form = ContactForm() 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", ""), + 'form': form } - 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..3c54884 100644 --- a/static/css/custom.css +++ b/static/css/custom.css @@ -1,4 +1,105 @@ -/* Custom styles for the application */ -body { - font-family: system-ui, -apple-system, sans-serif; +:root { + --primary-blue: #0066CC; + --secondary-green: #005A4A; + --light-gray: #f8f9fa; + --dark-gray: #343A40; + --font-headings: 'Poppins', sans-serif; + --font-body: 'Lato', sans-serif; } + +body { + font-family: var(--font-body); + color: var(--dark-gray); + background-color: #fff; +} + +h1, h2, h3, h4, h5, h6 { + font-family: var(--font-headings); + font-weight: 700; +} + +.hero-section { + background: linear-gradient(90deg, var(--primary-blue), var(--secondary-green)); + padding: 6rem 0; + color: white; +} + +.hero-logo { + max-width: 150px; + background: white; + border-radius: 15px; + padding: 10px; +} + +.hero-title { + font-size: 3.5rem; + font-weight: 700; +} + +.hero-subtitle { + font-size: 1.25rem; + font-weight: 400; +} + +.section-title { + color: var(--primary-blue); + font-weight: 700; + margin-bottom: 1rem; +} + +.section-subtitle { + font-size: 1.1rem; + color: #6c757d; +} + +.contact-info { + margin-top: 2rem; + font-size: 1.1rem; +} + +.contact-info p { + margin-bottom: 1rem; +} + +.form-container { + background-color: #ffffff; + padding: 2.5rem; + border-radius: 15px; + box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1); +} + +.form-control { + padding: 1rem; + border-radius: 8px; + border: 1px solid #ced4da; +} + +.form-control:focus { + border-color: var(--primary-blue); + box-shadow: 0 0 0 0.25rem rgba(0, 102, 204, 0.25); +} + +.btn-primary { + background-color: var(--primary-blue); + border-color: var(--primary-blue); + padding: 1rem; + font-weight: 700; + font-family: var(--font-headings); + border-radius: 8px; + transition: background-color 0.3s ease; +} + +.btn-primary:hover { + background-color: #0056b3; + border-color: #0056b3; +} + +.alert-success { + background-color: var(--secondary-green); + color: white; + border-color: var(--secondary-green); +} + +.btn-close { + filter: invert(1) grayscale(100%) brightness(200%); +} \ No newline at end of file diff --git a/staticfiles/css/custom.css b/staticfiles/css/custom.css index 108056f..3c54884 100644 --- a/staticfiles/css/custom.css +++ b/staticfiles/css/custom.css @@ -1,21 +1,105 @@ - :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); + --primary-blue: #0066CC; + --secondary-green: #005A4A; + --light-gray: #f8f9fa; + --dark-gray: #343A40; + --font-headings: 'Poppins', sans-serif; + --font-body: 'Lato', sans-serif; } + 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: var(--font-body); + color: var(--dark-gray); + background-color: #fff; } + +h1, h2, h3, h4, h5, h6 { + font-family: var(--font-headings); + font-weight: 700; +} + +.hero-section { + background: linear-gradient(90deg, var(--primary-blue), var(--secondary-green)); + padding: 6rem 0; + color: white; +} + +.hero-logo { + max-width: 150px; + background: white; + border-radius: 15px; + padding: 10px; +} + +.hero-title { + font-size: 3.5rem; + font-weight: 700; +} + +.hero-subtitle { + font-size: 1.25rem; + font-weight: 400; +} + +.section-title { + color: var(--primary-blue); + font-weight: 700; + margin-bottom: 1rem; +} + +.section-subtitle { + font-size: 1.1rem; + color: #6c757d; +} + +.contact-info { + margin-top: 2rem; + font-size: 1.1rem; +} + +.contact-info p { + margin-bottom: 1rem; +} + +.form-container { + background-color: #ffffff; + padding: 2.5rem; + border-radius: 15px; + box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1); +} + +.form-control { + padding: 1rem; + border-radius: 8px; + border: 1px solid #ced4da; +} + +.form-control:focus { + border-color: var(--primary-blue); + box-shadow: 0 0 0 0.25rem rgba(0, 102, 204, 0.25); +} + +.btn-primary { + background-color: var(--primary-blue); + border-color: var(--primary-blue); + padding: 1rem; + font-weight: 700; + font-family: var(--font-headings); + border-radius: 8px; + transition: background-color 0.3s ease; +} + +.btn-primary:hover { + background-color: #0056b3; + border-color: #0056b3; +} + +.alert-success { + background-color: var(--secondary-green); + color: white; + border-color: var(--secondary-green); +} + +.btn-close { + filter: invert(1) grayscale(100%) brightness(200%); +} \ No newline at end of file