Skip to content
Snippets Groups Projects
Commit 0c00a934 authored by ynerant's avatar ynerant
Browse files

Translate some docs

parent d8a785d3
No related branches found
No related tags found
1 merge request!56Corrections
Pipeline #7924 passed with stages
in 4 minutes and 4 seconds
......@@ -35,7 +35,7 @@ def get_current_authenticated_user():
class LogsMiddleware(object):
"""
Ce middleware permet de récupérer l'utilisateur actif ainsi que son adresse IP à chaque connexion.
This middleware get the current user with his or her IP address on each request.
"""
def __init__(self, get_response):
......
......@@ -33,8 +33,7 @@ EXCLUDED = [
def pre_save_object(sender, instance, **kwargs):
"""
Avant la sauvegarde d'un modèle, on récupère l'ancienne instance actuellement en base de données
que l'on garde en mémoire
Before a model get saved, we get the previous instance that is currently in the database
"""
qs = sender.objects.filter(pk=instance.pk).all()
if qs.exists():
......@@ -45,8 +44,8 @@ def pre_save_object(sender, instance, **kwargs):
def save_object(sender, instance, **kwargs):
"""
Dès qu'un modèle est sauvegardé, une entrée dans la table `Changelog` est ajouté dans la base de données
afin de répertorier chaque modification effectuée
Each time a model is saved, an entry in the table `Changelog` is added in the database
in order to store each modification made
"""
# noinspection PyProtectedMember
if instance._meta.label_lower in EXCLUDED:
......@@ -102,7 +101,7 @@ def save_object(sender, instance, **kwargs):
def delete_object(sender, instance, **kwargs):
"""
Dès qu'un modèle est supprimé, une entrée dans la table `Changelog` est ajouté dans la base de données
Each time a model is deleted, an entry in the table `Changelog` is added in the database
"""
# noinspection PyProtectedMember
if instance._meta.label_lower in EXCLUDED:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment