django-admin-honeypot

This commit is contained in:
Fred Pauchet 2016-05-11 15:37:26 +02:00
parent 375cb79054
commit e4c8a24855
2 changed files with 22 additions and 1 deletions

21
source/admin/annex.rst Normal file
View File

@ -0,0 +1,21 @@
*******
Annexes
*******
Django-Admin-honeypot
=====================
`django-admin-honeypot <https://django-admin-honeypot.readthedocs.io/en/latest/>`_ is a fake Django admin login screen to log and notify admins of attempted unauthorized access. This app was inspired by discussion in and around Paul McMillans security talk at DjangoCon 2011. Cette librairie est surtout utile si elle est couplée avec les *loggers*:
.. code-block:: python
# Taken directly from core Django code.
# Used here to illustrate an example only, so don't
# copy this into your project.
logger.warning("Forbidden (%s): %s",
REASON_NO_CSRF_COOKIE, request.path,
extra={
"status_code": 403,
"request": request,
}
)

View File

@ -78,7 +78,7 @@ A partir de maintenant, on peut accéder à nos propriétés de la manière suiv
.. code-block:: python .. code-block:: python
# $ python manage.py shell # python manage.py shell
>>> from wish.models import Wishlist, Item >>> from wish.models import Wishlist, Item
>>> w = Wishlist('Liste de test', 'description') >>> w = Wishlist('Liste de test', 'description')