- Split monolithic app.py (400+ lines) into organized modules - Extract models, forms, and commands into separate files - Implement Flask blueprints for route organization - Maintain full functionality with cleaner architecture - Update all templates to use new blueprint URLs - Enhance README with technical documentation Structure: ├── app.py (50 lines) - Flask app factory ├── models.py (62 lines) - SQLAlchemy models ├── forms.py (43 lines) - WTForms definitions ├── commands.py (74 lines) - CLI commands └── routes/ - Blueprint modules for each feature 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
142 lines
7.6 KiB
HTML
142 lines
7.6 KiB
HTML
{% extends "base.html" %}
|
|
|
|
{% block title %}Accueil - Gestion Scolaire{% endblock %}
|
|
|
|
{% block content %}
|
|
<div class="space-y-8">
|
|
<div class="text-center">
|
|
<h1 class="text-3xl font-bold text-gray-900 mb-4">Tableau de bord</h1>
|
|
<p class="text-lg text-gray-600">Bienvenue dans votre application de gestion scolaire</p>
|
|
</div>
|
|
|
|
<!-- Statistiques -->
|
|
<div class="grid grid-cols-1 md:grid-cols-3 gap-6">
|
|
<div class="bg-white rounded-lg shadow p-6">
|
|
<div class="flex items-center">
|
|
<div class="flex-shrink-0">
|
|
<div class="w-8 h-8 bg-blue-500 rounded-full flex items-center justify-center">
|
|
<svg class="w-5 h-5 text-white" fill="currentColor" viewBox="0 0 20 20">
|
|
<path d="M9 12l2 2 4-4m6 2a9 9 0 11-18 0 9 9 0 0118 0z"/>
|
|
</svg>
|
|
</div>
|
|
</div>
|
|
<div class="ml-4">
|
|
<div class="text-sm font-medium text-gray-500">Classes</div>
|
|
<div class="text-2xl font-bold text-gray-900">{{ total_classes }}</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="bg-white rounded-lg shadow p-6">
|
|
<div class="flex items-center">
|
|
<div class="flex-shrink-0">
|
|
<div class="w-8 h-8 bg-green-500 rounded-full flex items-center justify-center">
|
|
<svg class="w-5 h-5 text-white" fill="currentColor" viewBox="0 0 20 20">
|
|
<path d="M10 9a3 3 0 100-6 3 3 0 000 6zm-7 9a7 7 0 1114 0H3z"/>
|
|
</svg>
|
|
</div>
|
|
</div>
|
|
<div class="ml-4">
|
|
<div class="text-sm font-medium text-gray-500">Élèves</div>
|
|
<div class="text-2xl font-bold text-gray-900">{{ total_students }}</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="bg-white rounded-lg shadow p-6">
|
|
<div class="flex items-center">
|
|
<div class="flex-shrink-0">
|
|
<div class="w-8 h-8 bg-purple-500 rounded-full flex items-center justify-center">
|
|
<svg class="w-5 h-5 text-white" fill="currentColor" viewBox="0 0 20 20">
|
|
<path d="M9 2a1 1 0 000 2h2a1 1 0 100-2H9z"/>
|
|
<path fill-rule="evenodd" d="M4 5a2 2 0 012-2v1a1 1 0 102 0V3a2 2 0 012 2v6a2 2 0 01-2 2H6a2 2 0 01-2-2V5zm2.5 2.5a.5.5 0 000 1h3a.5.5 0 000-1h-3z" clip-rule="evenodd"/>
|
|
</svg>
|
|
</div>
|
|
</div>
|
|
<div class="ml-4">
|
|
<div class="text-sm font-medium text-gray-500">Évaluations</div>
|
|
<div class="text-2xl font-bold text-gray-900">{{ total_assessments }}</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- Évaluations récentes -->
|
|
<div class="bg-white rounded-lg shadow">
|
|
<div class="px-6 py-4 border-b border-gray-200">
|
|
<h2 class="text-lg font-medium text-gray-900">Évaluations récentes</h2>
|
|
</div>
|
|
<div class="px-6 py-4">
|
|
{% if recent_assessments %}
|
|
<div class="space-y-4">
|
|
{% for assessment in recent_assessments %}
|
|
<div class="flex items-center justify-between py-3 border-b border-gray-100 last:border-b-0">
|
|
<div>
|
|
<h3 class="text-sm font-medium text-gray-900">{{ assessment.title }}</h3>
|
|
<p class="text-sm text-gray-500">{{ assessment.class_group.name }} - {{ assessment.date.strftime('%d/%m/%Y') }}</p>
|
|
</div>
|
|
<div class="text-sm text-gray-500">
|
|
Coeff. {{ assessment.coefficient }}
|
|
</div>
|
|
</div>
|
|
{% endfor %}
|
|
</div>
|
|
{% else %}
|
|
<p class="text-gray-500 text-center py-8">Aucune évaluation trouvée</p>
|
|
{% endif %}
|
|
</div>
|
|
</div>
|
|
|
|
<!-- Actions rapides -->
|
|
<div class="bg-white rounded-lg shadow">
|
|
<div class="px-6 py-4 border-b border-gray-200">
|
|
<h2 class="text-lg font-medium text-gray-900">Actions rapides</h2>
|
|
</div>
|
|
<div class="px-6 py-4">
|
|
<div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-4">
|
|
<a href="{{ url_for('classes') }}" class="block p-4 border border-gray-200 rounded-lg hover:bg-gray-50 transition-colors">
|
|
<div class="text-center">
|
|
<div class="w-8 h-8 bg-blue-100 rounded-full flex items-center justify-center mx-auto mb-2">
|
|
<svg class="w-4 h-4 text-blue-600" fill="currentColor" viewBox="0 0 20 20">
|
|
<path d="M9 12l2 2 4-4m6 2a9 9 0 11-18 0 9 9 0 0118 0z"/>
|
|
</svg>
|
|
</div>
|
|
<div class="text-sm font-medium text-gray-900">Gérer les classes</div>
|
|
</div>
|
|
</a>
|
|
<a href="{{ url_for('students') }}" class="block p-4 border border-gray-200 rounded-lg hover:bg-gray-50 transition-colors">
|
|
<div class="text-center">
|
|
<div class="w-8 h-8 bg-green-100 rounded-full flex items-center justify-center mx-auto mb-2">
|
|
<svg class="w-4 h-4 text-green-600" fill="currentColor" viewBox="0 0 20 20">
|
|
<path d="M10 9a3 3 0 100-6 3 3 0 000 6zm-7 9a7 7 0 1114 0H3z"/>
|
|
</svg>
|
|
</div>
|
|
<div class="text-sm font-medium text-gray-900">Gérer les élèves</div>
|
|
</div>
|
|
</a>
|
|
<a href="{{ url_for('assessments.list') }}" class="block p-4 border border-gray-200 rounded-lg hover:bg-gray-50 transition-colors">
|
|
<div class="text-center">
|
|
<div class="w-8 h-8 bg-purple-100 rounded-full flex items-center justify-center mx-auto mb-2">
|
|
<svg class="w-4 h-4 text-purple-600" fill="currentColor" viewBox="0 0 20 20">
|
|
<path d="M9 2a1 1 0 000 2h2a1 1 0 100-2H9z"/>
|
|
<path fill-rule="evenodd" d="M4 5a2 2 0 012-2v1a1 1 0 102 0V3a2 2 0 012 2v6a2 2 0 01-2 2H6a2 2 0 01-2-2V5zm2.5 2.5a.5.5 0 000 1h3a.5.5 0 000-1h-3z" clip-rule="evenodd"/>
|
|
</svg>
|
|
</div>
|
|
<div class="text-sm font-medium text-gray-900">Créer évaluation</div>
|
|
</div>
|
|
</a>
|
|
<div class="block p-4 border border-gray-200 rounded-lg bg-gray-50">
|
|
<div class="text-center">
|
|
<div class="w-8 h-8 bg-gray-100 rounded-full flex items-center justify-center mx-auto mb-2">
|
|
<svg class="w-4 h-4 text-gray-400" fill="currentColor" viewBox="0 0 20 20">
|
|
<path fill-rule="evenodd" d="M3 4a1 1 0 011-1h12a1 1 0 011 1v2a1 1 0 01-1 1H4a1 1 0 01-1-1V4zm0 4a1 1 0 011-1h12a1 1 0 011 1v6a1 1 0 01-1 1H4a1 1 0 01-1-1V8z" clip-rule="evenodd"/>
|
|
</svg>
|
|
</div>
|
|
<div class="text-sm font-medium text-gray-500">Rapports (prochainement)</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
{% endblock %} |