165 lines
3.9 KiB
Markdown
165 lines
3.9 KiB
Markdown
# Portfolio Django — Alexandre
|
|
|
|
Portfolio professionnel moderne pour forum industriel (Global Industrie).
|
|
Backend Django, données 100% JSON, design tech/industrie.
|
|
|
|
---
|
|
|
|
## Lancement rapide
|
|
|
|
### 1. Prérequis
|
|
- Python 3.10 ou supérieur
|
|
- pip
|
|
|
|
### 2. Installation
|
|
|
|
```bash
|
|
# Cloner / décompresser le projet, puis :
|
|
cd portfolio_django
|
|
|
|
# Créer un environnement virtuel
|
|
python -m venv venv
|
|
|
|
# Activer l'environnement (Windows)
|
|
venv\Scripts\activate
|
|
|
|
# Activer l'environnement (Linux / Mac)
|
|
source venv/bin/activate
|
|
|
|
# Installer Django
|
|
pip install -r requirements.txt
|
|
```
|
|
|
|
### 3. Lancer le serveur
|
|
|
|
```bash
|
|
python manage.py runserver
|
|
```
|
|
|
|
Ouvre ton navigateur sur : **http://127.0.0.1:8000**
|
|
|
|
---
|
|
|
|
## Modifier tes projets
|
|
|
|
**Tout se passe dans un seul fichier :**
|
|
|
|
```
|
|
data/projects.json
|
|
```
|
|
|
|
### Ajouter un projet
|
|
|
|
Copie ce bloc dans le tableau `"projects"` :
|
|
|
|
```json
|
|
{
|
|
"title": "Nom de ton projet",
|
|
"short_description": "Description courte (2-3 lignes) pour les cartes.",
|
|
"full_description": "Description complète avec tous les détails techniques.\nPeut contenir plusieurs paragraphes.",
|
|
"technologies": ["Python", "Arduino", "Django"],
|
|
"highlights": [
|
|
"Point fort numéro 1",
|
|
"Résultat concret obtenu",
|
|
"Ce qui le rend unique"
|
|
],
|
|
"images": [
|
|
"/static/images/mon-projet/photo1.jpg",
|
|
"/static/images/mon-projet/photo2.jpg"
|
|
],
|
|
"category": "Robotique"
|
|
}
|
|
```
|
|
|
|
### Ajouter des images
|
|
|
|
1. Dépose tes images dans `static/images/nom-projet/`
|
|
2. Référence-les dans le JSON : `"/static/images/nom-projet/photo.jpg"`
|
|
|
|
### Catégories disponibles (modifiables)
|
|
|
|
- `Robotique`
|
|
- `Systèmes Embarqués`
|
|
- `Réseaux Industriels`
|
|
- `Backend`
|
|
- `Informatique Industrielle`
|
|
- *(ajoute les tiennes librement)*
|
|
|
|
---
|
|
|
|
## Architecture du projet
|
|
|
|
```
|
|
portfolio_django/
|
|
├── manage.py # Point d'entrée Django
|
|
├── requirements.txt # Dépendances (Django uniquement)
|
|
├── README.md # Ce fichier
|
|
│
|
|
├── data/
|
|
│ └── projects.json # ← MODIFIER CE FICHIER pour tes projets
|
|
│
|
|
├── portfolio/ # Configuration Django
|
|
│ ├── settings.py
|
|
│ ├── urls.py
|
|
│ └── wsgi.py
|
|
│
|
|
├── projects/ # App principale
|
|
│ ├── views.py # Logique des pages
|
|
│ ├── urls.py # Routes URL
|
|
│ └── utils.py # Chargeur JSON + filtres
|
|
│
|
|
├── templates/ # Templates HTML
|
|
│ ├── base.html # Layout commun (navbar + footer)
|
|
│ ├── home.html # Page d'accueil
|
|
│ └── projects/
|
|
│ ├── list.html # Liste des projets + filtres
|
|
│ └── detail.html # Page détail projet
|
|
│
|
|
└── static/
|
|
├── css/style.css # Styles (thème dark tech)
|
|
├── js/main.js # Filtres, lightbox, animations
|
|
└── images/ # Tes images de projets
|
|
```
|
|
|
|
---
|
|
|
|
## Pages disponibles
|
|
|
|
| URL | Description |
|
|
|-----|-------------|
|
|
| `/` | Page d'accueil avec hero, compétences, projets vedette |
|
|
| `/projets/` | Tous les projets avec filtres |
|
|
| `/projets/?category=Robotique` | Filtré par catégorie |
|
|
| `/projets/?tech=Python` | Filtré par technologie |
|
|
| `/projets/nom-du-projet/` | Page détail d'un projet |
|
|
|
|
---
|
|
|
|
## Personnalisation
|
|
|
|
### Changer ton nom / email / liens
|
|
Modifie directement dans `templates/home.html` :
|
|
- Nom affiché dans le hero
|
|
- Email de contact
|
|
- Liens GitHub et LinkedIn
|
|
|
|
### Changer les couleurs
|
|
Dans `static/css/style.css`, modifie les variables CSS au début du fichier :
|
|
```css
|
|
:root {
|
|
--accent-primary: #3b82f6; /* Couleur principale (bleu) */
|
|
--bg-primary: #0a0e1a; /* Fond sombre */
|
|
...
|
|
}
|
|
```
|
|
|
|
---
|
|
|
|
## Déploiement (optionnel)
|
|
|
|
Pour déployer sur un serveur :
|
|
1. Change `DEBUG = False` dans `settings.py`
|
|
2. Mets ta vraie `SECRET_KEY`
|
|
3. Ajoute ton domaine dans `ALLOWED_HOSTS`
|
|
4. Lance `python manage.py collectstatic`
|