Browse Source

Doc: Refine loader description

pull/207/head
winkidney 4 years ago
parent
commit
f15f8209d8
1 changed files with 3 additions and 3 deletions
  1. +3
    -3
      docs/src/plugin-system.md

+ 3
- 3
docs/src/plugin-system.md View File

@@ -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):


Loading…
Cancel
Save