suppresion du fichier app

This commit is contained in:
Mahel Fonteneau 2025-02-12 17:04:49 +01:00
parent 812c748cd8
commit 60214f77a7
9 changed files with 0 additions and 114 deletions

View File

View File

@ -1,19 +0,0 @@
from flask_wtf import FlaskForm
from wtforms import StringField, TextAreaField, SubmitField
from wtforms.validators import DataRequired, Email, Length
class ContactForm(FlaskForm):
name = StringField(
'Nom',
validators=[DataRequired(), Length(min=2, max=50)]
)
email = StringField(
'Email',
validators=[DataRequired(), Email()]
)
message = TextAreaField(
'Message',
validators=[DataRequired(), Length(min=10, max=500)]
)
submit = SubmitField('Envoyer')

View File

View File

@ -1,5 +0,0 @@
from flask import render_template
@app.route('/')
def index():
return render_template('index.html')

Binary file not shown.

Before

Width:  |  Height:  |  Size: 938 KiB

View File

@ -1,24 +0,0 @@
<!DOCTYPE html>
<html lang="fr">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="{{ url_for('static', filename='styles.css') }}">
<title>{% block title %}Mon Site{% endblock %}</title>
</head>
<body>
<header>
<h1>Bienvenue sur mon site</h1>
</header>
<main>
{% block content %}{% endblock %}
</main>
<footer>
<p>&copy; 2025 Mon Site. Tous droits réservés.</p>
</footer>
</body>
</html>

View File

@ -1,49 +0,0 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Contact</title>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0-alpha3/dist/css/bootstrap.min.css">
</head>
<body>
<div class="container mt-5">
<h1>Contactez-nous</h1>
<form method="POST">
<!-- CSRF token (voir plus bas)-->
{{ form.hidden_tag() }}
<div class="mb-3">
{{ form.name.label(class="form-label") }}
{{ form.name(class="form-control", placeholder="nom") }}
{% for error in form.name.errors %}
<div class="text-danger">{{ error }}</div>
{% endfor %}
</div>
<div class="mb-3">
{{ form.email.label(class="form-label") }}
{{ form.email(class="form-control", placeholder="email") }}
{% for error in form.email.errors %}
<div class="text-danger">{{ error }}</div>
{% endfor %}
</div>
<div class="mb-3">
{{ form.message.label(class="form-label") }}
{{ form.message(class="form-control", placeholder="message") }}
{% for error in form.message.errors %}
<div class="text-danger">{{ error }}</div>
{% endfor %}
</div>
<button type="submit" class="btn btn-primary">{{ form.submit.label }}</button>
</form>
{% with messages = get_flashed_messages(with_categories=True) %}
{% if messages %}
<div class="mt-3">
{% for category, message in messages %}
<div class="alert alert-{{ category }}">{{ message }}</div>
{% endfor %}
</div>
{% endif %}
{% endwith %}
</div>
</body>
</html>

View File

@ -1,17 +0,0 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>TITRE</title>
</head>
<body>
<header>
<h1>TITRE</h1>
<p>Bonjour vous !</p>
</header>
<main>
<h2>Messages :</h2>
</main>
</body>
</html>