From f15f8209d832c16456cdb7e75355ec5adf6ccf3e Mon Sep 17 00:00:00 2001 From: winkidney Date: Fri, 8 May 2020 13:01:27 +0800 Subject: [PATCH] Doc: Refine loader description --- docs/src/plugin-system.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/src/plugin-system.md b/docs/src/plugin-system.md index 7706a8c..c53e397 100644 --- a/docs/src/plugin-system.md +++ b/docs/src/plugin-system.md @@ -3,10 +3,10 @@ New plugin system is under development and a naive version has been released. A `PinryPlugin` is a python class or object which is callable. -The plugin loader will call the plugin argument only once and use the plugin +The plugin loader will call the `Plugin` target only once and use the plugin instance after specified events triggered just like the way django-middleware works. -You could create a plugin as python-package with content: +You could create a plugin as python-package with content below: ``` from core.models import Image @@ -16,7 +16,7 @@ from django_images.models import Thumbnail class Plugin: def __init__(self): - # do something you want, just be called only + # do something you want, just be called only once pass def process_image_pre_creation(self, django_settings, image_instance: Image):