mirror of
https://github.com/pinry/pinry.git
synced 2026-01-13 18:52:07 +01:00
Doc: Refine loader description
This commit is contained in:
@@ -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):
|
||||
|
||||
Reference in New Issue
Block a user