Provides the Django Model class that the DongTai project depends on, the Django API abstract class of the DongTai project, the vulnerability detection engine, constants, documents, etc.
- Install dongtai dependency package
Project packaging
$ python setup.py sdist
Install package
$ pip install dist/dongtai-0.1.0.tar.gz
- turn on dongtai
Edit settings.py
:
INSTALLED_APPS = [
...
'dongtai',
...
]
- turn on logger
Edit
settings.py
, add log loggers and handlers ofdongtai-core
:
LOGGING = {
'version': 1,
'disable_existing_loggers': False,
'formatters': {
'verbose': {
'format': '{levelname} {asctime} [{module}.{funcName}:{lineno}] {message}',
'style': '{',
},
'simple': {
'format': '{levelname} {message}',
'style': '{',
},
},
'handlers': {
'console': {
'level': 'DEBUG',
'class': 'logging.StreamHandler',
'formatter': 'verbose'
},
'dongtai.core': {
'class': 'logging.handlers.RotatingFileHandler',
'filename': 'logs/core.log',
'backupCount': 5,
'maxBytes': 1024 * 1024 * 10,
'formatter': 'verbose'
},
},
'loggers':
...
'dongtai-core': {
'handlers': ['console', 'dongtai.core'],
'propagate': True,
'level': 'INFO',
},
...
}
}