Compare commits

..

No commits in common. "ai-dev" and "master" have entirely different histories.

18 changed files with 188 additions and 342 deletions

5
.env
View File

@ -1,5 +0,0 @@
DB_NAME=flatlogic_django
DB_USER=ubuntu
DB_PASS=ubuntu
DB_HOST=127.0.0.1
DB_PORT=3306

View File

@ -1,9 +1,3 @@
from django.contrib import admin
from .models import ContactSubmission
@admin.register(ContactSubmission)
class ContactSubmissionAdmin(admin.ModelAdmin):
list_display = ('full_name', 'email', 'phone', 'formation_interest', 'created_at')
search_fields = ('full_name', 'email', 'phone')
list_filter = ('created_at', 'formation_interest')
readonly_fields = ('created_at',)
# Register your models here.

View File

@ -1,13 +0,0 @@
from django import forms
from .models import ContactSubmission
class ContactForm(forms.ModelForm):
class Meta:
model = ContactSubmission
fields = ['full_name', 'email', 'phone', 'message']
widgets = {
'full_name': forms.TextInput(attrs={'class': 'form-control', 'placeholder': 'Nom complet'}),
'email': forms.EmailInput(attrs={'class': 'form-control', 'placeholder': 'Email'}),
'phone': forms.TextInput(attrs={'class': 'form-control', 'placeholder': 'Téléphone'}),
'message': forms.Textarea(attrs={'class': 'form-control', 'rows': 4, 'placeholder': 'Votre message'}),
}

View File

@ -1,26 +0,0 @@
# Generated by Django 5.2.7 on 2025-11-30 16:39
from django.db import migrations, models
class Migration(migrations.Migration):
initial = True
dependencies = [
]
operations = [
migrations.CreateModel(
name='ContactSubmission',
fields=[
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('full_name', models.CharField(max_length=100)),
('email', models.EmailField(blank=True, max_length=254)),
('phone', models.CharField(max_length=20)),
('formation_interest', models.CharField(blank=True, max_length=200)),
('message', models.TextField(blank=True)),
('created_at', models.DateTimeField(auto_now_add=True)),
],
),
]

View File

@ -1,12 +1,3 @@
from django.db import models
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')}"
# Create your models here.

View File

@ -3,17 +3,7 @@
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>{% block title %}Institut ITM{% endblock %}</title>
<!-- Google Fonts -->
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Lato:wght@400;700&family=Poppins:wght@600;700&display=swap" rel="stylesheet">
<!-- Bootstrap CSS -->
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/css/bootstrap.min.css" rel="stylesheet">
<title>{% block title %}Knowledge Base{% endblock %}</title>
{% if project_description %}
<meta name="description" content="{{ project_description }}">
<meta property="og:description" content="{{ project_description }}">
@ -30,7 +20,6 @@
<body>
{% block content %}{% endblock %}
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/js/bootstrap.bundle.min.js"></script>
</body>
</html>

View File

@ -1,52 +1,145 @@
{% extends 'base.html' %}
{% load static %}
{% extends "base.html" %}
{% block title %}Accueil - Institut ITM{% endblock %}
{% block title %}{{ project_name }}{% endblock %}
{% block head %}
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;700&display=swap" rel="stylesheet">
<style>
: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);
}
* {
box-sizing: border-box;
}
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;
}
body::before {
content: '';
position: absolute;
inset: 0;
background-image: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' width='100' height='100' viewBox='0 0 100 100'><path d='M-10 10L110 10M10 -10L10 110' stroke-width='1' stroke='rgba(255,255,255,0.05)'/></svg>");
animation: bg-pan 20s linear infinite;
z-index: -1;
}
@keyframes bg-pan {
0% {
background-position: 0% 0%;
}
100% {
background-position: 100% 100%;
}
}
main {
padding: 2rem;
}
.card {
background: var(--card-bg-color);
border: 1px solid var(--card-border-color);
border-radius: 16px;
padding: 2.5rem 2rem;
backdrop-filter: blur(20px);
-webkit-backdrop-filter: blur(20px);
box-shadow: 0 12px 36px rgba(0, 0, 0, 0.25);
}
h1 {
font-size: clamp(2.2rem, 3vw + 1.2rem, 3.2rem);
font-weight: 700;
margin: 0 0 1.2rem;
letter-spacing: -0.02em;
}
p {
margin: 0.5rem 0;
font-size: 1.1rem;
opacity: 0.92;
}
.loader {
margin: 1.5rem auto;
width: 56px;
height: 56px;
border: 4px solid rgba(255, 255, 255, 0.25);
border-top-color: #fff;
border-radius: 50%;
animation: spin 1s linear infinite;
}
@keyframes spin {
to {
transform: rotate(360deg);
}
}
.runtime code {
background: rgba(0, 0, 0, 0.25);
padding: 0.15rem 0.45rem;
border-radius: 4px;
font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
.sr-only {
position: absolute;
width: 1px;
height: 1px;
padding: 0;
margin: -1px;
overflow: hidden;
clip: rect(0, 0, 0, 0);
border: 0;
}
footer {
position: absolute;
bottom: 1rem;
width: 100%;
text-align: center;
font-size: 0.85rem;
opacity: 0.75;
}
</style>
{% endblock %}
{% block content %}
<div class="hero-section">
<div class="container text-center">
<img src="https://i.ibb.co/jXmDKP9/2-4.png" alt="Institut ITM Logo" class="hero-logo mb-4">
<h1 class="hero-title">Institut ITM de Formation</h1>
<p class="hero-subtitle">Votre avenir professionnel commence ici. Des formations d'excellence pour un succès garanti.</p>
<main>
<div class="card">
<h1>Analyzing your requirements and generating your app…</h1>
<div class="loader" role="status" aria-live="polite" aria-label="Applying initial changes">
<span class="sr-only">Loading…</span>
</div>
</div>
<div class="container py-5">
{% if messages %}
{% for message in messages %}
<div class="alert alert-success alert-dismissible fade show" role="alert">
{{ message }}
<button type="button" class="btn-close" data-bs-dismiss="alert" aria-label="Close"></button>
</div>
{% endfor %}
{% endif %}
<div class="row g-5 align-items-center">
<div class="col-lg-6">
<h2 class="section-title">Contactez-Nous</h2>
<p class="section-subtitle">Une question ? Un projet ? N'hésitez pas à nous contacter. Notre équipe est à votre disposition pour vous orienter et vous accompagner.</p>
<div class="contact-info">
<p><strong><i class="icon"></i>Adresse (Ouled Fayet):</strong> Villa N° 12, Cité 150 Logements, El Achour, Alger</p>
<p><strong><i class="icon"></i>Adresse (Draria):</strong> Rue Benchabane Mouloud, Draria 16050</p>
<p><strong><i class="icon"></i>Téléphone:</strong> +213 660 64 85 47</p>
<p><strong><i class="icon"></i>Email:</strong> oguernouti@institut-itm.com</p>
</div>
</div>
<div class="col-lg-6">
<div class="form-container">
<form method="post" novalidate>
{% csrf_token %}
{% for field in form %}
<div class="mb-3">
{{ field }}
</div>
{% endfor %}
<button type="submit" class="btn btn-primary w-100">Envoyer le Message</button>
</form>
</div>
</div>
</div>
</div>
{% endblock %}
<p class="hint">AppWizzy AI is collecting your requirements and applying the first changes.</p>
<p class="hint">This page will refresh automatically as the plan is implemented.</p>
<p class="runtime">
Runtime: Django <code>{{ django_version }}</code> · Python <code>{{ python_version }}</code>
— UTC <code>{{ current_time|date:"Y-m-d H:i:s" }}</code>
</p>
</div>
</main>
<footer>
Page updated: {{ current_time|date:"Y-m-d H:i:s" }} (UTC)
</footer>
{% endblock %}

View File

@ -1,6 +1,7 @@
from django.urls import path
from .views import index
from .views import home
urlpatterns = [
path("", index, name="index"),
]
path("", home, name="home"),
]

View File

@ -1,18 +1,25 @@
from django.shortcuts import render
from .forms import ContactForm
from django.contrib import messages
import os
import platform
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()
from django import get_version as django_version
from django.shortcuts import render
from django.utils import timezone
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()
context = {
'form': form
"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)
return render(request, "core/index.html", context)

View File

@ -1,105 +1,4 @@
:root {
--primary-blue: #0066CC;
--secondary-green: #005A4A;
--light-gray: #f8f9fa;
--dark-gray: #343A40;
--font-headings: 'Poppins', sans-serif;
--font-body: 'Lato', sans-serif;
}
/* Custom styles for the application */
body {
font-family: var(--font-body);
color: var(--dark-gray);
background-color: #fff;
font-family: system-ui, -apple-system, sans-serif;
}
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%);
}

View File

@ -1,105 +1,21 @@
:root {
--primary-blue: #0066CC;
--secondary-green: #005A4A;
--light-gray: #f8f9fa;
--dark-gray: #343A40;
--font-headings: 'Poppins', sans-serif;
--font-body: 'Lato', sans-serif;
--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);
}
body {
font-family: var(--font-body);
color: var(--dark-gray);
background-color: #fff;
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;
}
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%);
}