gwift-book/source/admin/annex.rst

22 lines
779 B
ReStructuredText
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

*******
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,
}
)