Задать вопрос

Тел: +7 965 3737 888

1582

Просмотров

0

Ответов

Clean Reversion History: Remove unimportant Changes

<p>If you use this pattern to track changes in the auth user table:</p>
from django.contrib.auth.models import User
from reversion.helpers import patch_admin
patch_admin(User)

<p>you can't see important changes, since a version is created for every login if a user. If you want to get rid of changes which only change unimportant stuff you can use this middleware.</p>
<p>This middleware can be used for every model. Just use this pattern in your settings:</p>
REVERSION_CLEAN={
    'django.contrib.auth': {'User': ['last_login']},
    }

Вопрос полезен? Да0/Нет0
file_3536.py(3.4Кб)
None