Changer les couleurs du texte du journal de sortie du serveur de développement Django
-
14-11-2019 - |
Question
Lors de l'exécution du serveur de test Django sur un projet local, pouvez-vous faire des erreurs de 400/500 se démarquer dans une couleur différente dans le texte de sortie?
La solution
The colors can be controlled using the DJANGO_COLORS
environment variable. See the docs on syntax coloring: https://docs.djangoproject.com/en/1.3/ref/django-admin/#syntax-coloring
This requires Django >= 1.2 and a platform which supports colors (disabled on Windows).
Autres conseils
LINK UPDATE: docs for version 1.3 are no longer available from docs.django.com. The current version of the doc on syntax coloring is here:
https://docs.djangoproject.com/en/1.9/ref/django-admin/#syntax-coloring
Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow