Skip to content

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.

License

Notifications You must be signed in to change notification settings

hxcorp/dongtai-core

 
 

Repository files navigation

DongTai-core

django-project DongTai-project DongTai-core

中文版本(Chinese version)

Whit is DongTai-Core?

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.

Quickstart

  1. Install dongtai dependency package

Project packaging

$ python setup.py sdist

Install package

$ pip install dist/dongtai-0.1.0.tar.gz
  1. turn on dongtai

Edit settings.py:

INSTALLED_APPS = [
    ...
    'dongtai',
    ...
]
  1. turn on logger Edit settings.py, add log loggers and handlers of dongtai-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',
        },
        ...
    }
}

About

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.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Python 100.0%