forked from Fred/gwift-book
django-admin-honeypot
This commit is contained in:
parent
375cb79054
commit
e4c8a24855
|
@ -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 McMillan’s 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,
|
||||||
|
}
|
||||||
|
)
|
|
@ -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')
|
||||||
|
|
Loading…
Reference in New Issue