Suivez ces étapes pour activer toutes les nouvelles fonctionnalités.
Dans le terminal où tourne le serveur, appuyez sur :
Ctrl + C
cd /Users/duhaz/projets/carb_cycling_app
source venv/bin/activate
Vous devriez voir (venv) apparaître devant votre prompt.
python manage.py makemigrations
Vous devriez voir :
Migrations for 'nutrition':
nutrition/migrations/0002_xxx.py
- Create model JourneeType
- Create model RepasType
- Create model CompositionRepasType
Puis :
python manage.py migrate
Vous devriez voir :
Running migrations:
Applying nutrition.0002_xxx... OK
python manage.py runserver
Vous devriez voir :
Django version 4.2.27, using settings 'carb_cycling.settings'
Starting development server at http://127.0.0.1:8000/
Quit the server with CONTROL-C.
Allez sur : http://127.0.0.1:8000
Vous avez oublié d'activer l'environnement virtuel :
source venv/bin/activate
Essayez de forcer la recréation :
python manage.py makemigrations nutrition
python manage.py migrate nutrition
Vérifiez que les URLs sont bien configurées :
python manage.py check
Vérifiez que jQuery est chargé en ouvrant la console du navigateur (F12).
⚠️ Attention : Cela supprime toutes vos données !
cd /Users/duhaz/projets/carb_cycling_app
rm db.sqlite3
rm -rf nutrition/migrations/00*.py
python manage.py makemigrations
python manage.py migrate
python manage.py load_aliments
python manage.py createsuperuser
python manage.py runserver
Si vous rencontrez des problèmes :
C'est prêt ! Profitez de vos nouvelles fonctionnalités ! 🎉