Ejemplo n.º 1
0
 def __init__(self, **kwargs):
     super(ScriptForm, self).__init__(**kwargs)
     event_choices = get_name_map("notify_event")
     self.fields["event_identifier"].choices = event_choices
     self.fields["event_identifier"].widget.choices = event_choices
     if self.instance.pk:
         self.fields["event_identifier"].help_text = (
             _(u"Warning: Changing the event for an existing script may have unexpected effects.")
         )
Ejemplo n.º 2
0
Archivo: list.py Proyecto: charn/shoop
 def get_event_identifier_text(self, instance):
     if not hasattr(self, "_event_identifier_names"):
         self._event_identifier_names = dict(get_name_map("notify_event"))
     return self._event_identifier_names.get(instance.event_identifier, instance.event_identifier)
Ejemplo n.º 3
0
 def get_event_identifier_text(self, instance):
     if not hasattr(self, "_event_identifier_names"):
         self._event_identifier_names = dict(get_name_map("notify_event"))
     return self._event_identifier_names.get(instance.event_identifier, instance.event_identifier)