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 cd6f855..de82fa3 100644 Binary files a/core/__pycache__/admin.cpython-311.pyc and b/core/__pycache__/admin.cpython-311.pyc differ diff --git a/core/__pycache__/forms.cpython-311.pyc b/core/__pycache__/forms.cpython-311.pyc new file mode 100644 index 0000000..eb9fbb7 Binary files /dev/null and b/core/__pycache__/forms.cpython-311.pyc differ diff --git a/core/__pycache__/models.cpython-311.pyc b/core/__pycache__/models.cpython-311.pyc index 9aa598b..7c3b135 100644 Binary files a/core/__pycache__/models.cpython-311.pyc and b/core/__pycache__/models.cpython-311.pyc differ diff --git a/core/__pycache__/urls.cpython-311.pyc b/core/__pycache__/urls.cpython-311.pyc index 1f807fa..d735205 100644 Binary files a/core/__pycache__/urls.cpython-311.pyc and b/core/__pycache__/urls.cpython-311.pyc differ diff --git a/core/__pycache__/views.cpython-311.pyc b/core/__pycache__/views.cpython-311.pyc index 6867ddf..7d23dff 100644 Binary files a/core/__pycache__/views.cpython-311.pyc and b/core/__pycache__/views.cpython-311.pyc differ diff --git a/core/admin.py b/core/admin.py index 8c38f3f..0de07a7 100644 --- a/core/admin.py +++ b/core/admin.py @@ -1,3 +1,9 @@ from django.contrib import admin +from .models import ContactSubmission -# Register your models here. +@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',) \ No newline at end of file diff --git a/core/forms.py b/core/forms.py new file mode 100644 index 0000000..b9b3c32 --- /dev/null +++ b/core/forms.py @@ -0,0 +1,13 @@ +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'}), + } diff --git a/core/migrations/0001_initial.py b/core/migrations/0001_initial.py new file mode 100644 index 0000000..46f7020 --- /dev/null +++ b/core/migrations/0001_initial.py @@ -0,0 +1,26 @@ +# 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)), + ], + ), + ] diff --git a/core/migrations/__pycache__/0001_initial.cpython-311.pyc b/core/migrations/__pycache__/0001_initial.cpython-311.pyc new file mode 100644 index 0000000..a12c687 Binary files /dev/null and b/core/migrations/__pycache__/0001_initial.cpython-311.pyc differ diff --git a/core/migrations/__pycache__/__init__.cpython-311.pyc b/core/migrations/__pycache__/__init__.cpython-311.pyc index 58b1c14..49f9fe9 100644 Binary files a/core/migrations/__pycache__/__init__.cpython-311.pyc and b/core/migrations/__pycache__/__init__.cpython-311.pyc differ 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" }} -

-
-
- -{% 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