ralph_assets.signals module defines a set of signals sent by the ralph_assets.
Use this type of signals if you want send email or something else after some transition.
Arguments sent with this signal:
- A user which run transition.
- A list of assets which undergo transition.
- A transition object.
Signals related with form.
This signal is useful if you want customize form from external application. Arguments sent with this signal:
- The form instance.
- A string. Possible values:
from django import forms from ralph_assets.signals import post_customize_fields @receiver(post_customize_fields) def my_awesome_customizer(sender, mode, **kwargs): if(len(sender['barcode'].value) < 50) sender.fields['barcode'].widget = forms.widgets.TextInput()