Beispiel #1
0
# This file is part of Indico.
# Copyright (C) 2002 - 2019 CERN
#
# Indico is free software; you can redistribute it and/or
# modify it under the terms of the MIT License; see the
# LICENSE file for more details.

from indico.core.signals.event import _signals


contribution_created = _signals.signal('contribution-created', """
Called when a new contribution is created. The `sender` is the new contribution.
""")

contribution_deleted = _signals.signal('contribution-deleted', """
Called when a contribution is deleted. The *sender* is the contribution.
""")

contribution_updated = _signals.signal('contribution-updated', """
Called when a contribution is modified. The *sender* is the contribution.
A dict containing ``old, new`` tuples for all changed values is passed
in the ``changes`` kwarg.
""")


subcontribution_created = _signals.signal('subcontribution-created', """
Called when a new subcontribution is created. The `sender` is the new subcontribution.
""")

subcontribution_deleted = _signals.signal('subcontribution-deleted', """
Called when a subcontribution is deleted. The *sender* is the subcontribution.
Beispiel #2
0
# published by the Free Software Foundation; either version 3 of the
# License, or (at your option) any later version.
#
# Indico is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
# General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with Indico; if not, see <http://www.gnu.org/licenses/>.

from indico.core.signals.event import _signals

sidemenu = _signals.signal(
    'sidemenu', """
Expected to return ``MenuEntryData`` objects to be added to the event side menu.
A single entry can be returned directly, multiple entries must be yielded.
""")

deleted = _signals.signal(
    'deleted', """
Called when an event is deleted. The *sender* is the event object.
The `user` kwarg contains the user performing the deletion if available.
""")

cloned = _signals.signal(
    'cloned', """
Called when an event is cloned. The *sender* is the `Event` object of
the old event, the new event is passed in the `new_event` kwarg.
""")
Beispiel #3
0
# modify it under the terms of the GNU General Public License as
# published by the Free Software Foundation; either version 3 of the
# License, or (at your option) any later version.
#
# Indico is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
# General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with Indico; if not, see <http://www.gnu.org/licenses/>.

from indico.core.signals.event import _signals


abstract_created = _signals.signal('abstract-created', """
Called when a new abstract is created. The `sender` is the new abstract.
""")

abstract_deleted = _signals.signal('abstract-deleted', """
Called when an abstract is deleted. The *sender* is the abstract.
""")

abstract_state_changed = _signals.signal('abstract-state-changed', """
Called when an abstract is withdrawn. The *sender* is the abstract.
""")

abstract_updated = _signals.signal('abstract-updated', """
Called when an abstract is modified. The *sender* is the abstract.
""")
Beispiel #4
0
# This file is part of Indico.
# Copyright (C) 2002 - 2021 CERN
#
# Indico is free software; you can redistribute it and/or
# modify it under the terms of the MIT License; see the
# LICENSE file for more details.

from indico.core.signals.event import _signals


sidemenu = _signals.signal('sidemenu', """
Expected to return ``MenuEntryData`` objects to be added to the event side menu.
A single entry can be returned directly, multiple entries must be yielded.
""")

deleted = _signals.signal('deleted', """
Called when an event is deleted. The *sender* is the event object.
The `user` kwarg contains the user performing the deletion if available.
""")

restored = _signals.signal('restored', """
Called when a previously-deleted event is restored. The *sender* is the event
object. The `user` kwarg contains the user restoring the event if available,
and the `reason` kwarg the reason if available.
""")

updated = _signals.signal('updated', """
Called when basic data of an event is updated. The *sender* is the event.
A dict of changes is passed in the `changes` kwarg, with ``(old, new)``
tuples for each change. Note than the `person_links` change may happen
with `old` and `new` being the same lists for technical reasons. If the
Beispiel #5
0
# This file is part of Indico.
# Copyright (C) 2002 - 2019 CERN
#
# Indico is free software; you can redistribute it and/or
# modify it under the terms of the MIT License; see the
# LICENSE file for more details.

from indico.core.signals.event import _signals


timetable_entry_created = _signals.signal('timetable-entry-created', """
Called when a new timetable entry is created. The `sender` is the new entry.
""")

timetable_entry_updated = _signals.signal('timetable-entry-updated', """
Called when a timetable entry is updated. The `sender` is the entry.
A dict containing ``old, new`` tuples for all changed values is passed
in the ``changes`` kwarg.
""")

timetable_entry_deleted = _signals.signal('timetable-entry-deleted', """
Called when a timetable entry is deleted. The `sender` is the entry.
This signal is triggered right before the entry deletion is performed.
""")

times_changed = _signals.signal('times-changed', """
Called when the times of a scheduled object (contribution, break or
session block) change, either by a change in duration or start time.
The `sender` is the type of the object; the timetable entry is passed
as `entry` and the object is passed as `obj`.  Information about the
changes are passed as `changes` which is a dict containing old/new
Beispiel #6
0
# This file is part of Indico.
# Copyright (C) 2002 - 2019 CERN
#
# Indico is free software; you can redistribute it and/or
# modify it under the terms of the MIT License; see the
# LICENSE file for more details.

from __future__ import unicode_literals

from indico.core.signals.event import _signals


person_updated = _signals.signal('person-updated', """
Called when an EventPerson is modified. The *sender* is the EventPerson.
""")
Beispiel #7
0
# This file is part of Indico.
# Copyright (C) 2002 - 2022 CERN
#
# Indico is free software; you can redistribute it and/or
# modify it under the terms of the MIT License; see the
# LICENSE file for more details.

from indico.core.signals.event import _signals

before_reminder_make_email = _signals.signal(
    'before-reminder-make-email', '''
Executed before a reminder email is created. The `EventReminder` object is the sender.
The parameters to create an email (`to_list`, `from_address`, `template` and `attachments`)
are passed as kwargs; the signal can return a dict used to update the params which will then
be passed to the `make_email` call.
''')
Beispiel #8
0
# published by the Free Software Foundation; either version 3 of the
# License, or (at your option) any later version.
#
# Indico is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
# General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with Indico; if not, see <http://www.gnu.org/licenses/>.

from indico.core.signals.event import _signals


sidemenu = _signals.signal('sidemenu', """
Expected to return ``MenuEntryData`` objects to be added to the event side menu.
A single entry can be returned directly, multiple entries must be yielded.
""")

deleted = _signals.signal('deleted', """
Called when an event is deleted. The *sender* is the event object.
The `user` kwarg contains the user performing the deletion if available.
""")

updated = _signals.signal('updated', """
Called when basic data of an event is updated. The *sender* is the event.
""")

cloned = _signals.signal('cloned', """
Called when an event is cloned. The *sender* is the `Event` object of
the old event, the new event is passed in the `new_event` kwarg.
""")
Beispiel #9
0
# This file is part of Indico.
# Copyright (C) 2002 - 2019 CERN
#
# Indico is free software; you can redistribute it and/or
# modify it under the terms of the MIT License; see the
# LICENSE file for more details.

from __future__ import unicode_literals

from indico.core.signals.event import _signals

person_updated = _signals.signal(
    'person-updated', """
Called when an EventPerson is modified. The *sender* is the EventPerson.
""")
Beispiel #10
0
# published by the Free Software Foundation; either version 3 of the
# License, or (at your option) any later version.
#
# Indico is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
# General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with Indico; if not, see <http://www.gnu.org/licenses/>.

from indico.core.signals.event import _signals


contribution_created = _signals.signal('contribution-created', """
Called when a new contribution is created. The `sender` is the new contribution,
its parent category is passed in the `parent` kwarg.
""")

contribution_deleted = _signals.signal('contribution-deleted', """
Called when a contribution is deleted. The *sender* is the contribution, the parent
event is passed in the `parent` kwarg.
""")

contribution_title_changed = _signals.signal('contribution-title-changed', """
Called when the title of a contribution is changed. The `sender` is the contribution,
the old/new titles are passed in the `old` and `new` kwargs.
""")

contribution_data_changed = _signals.signal('contribution-data-changed', """
Called when some data of the contribution changed. The `sender` is the contribution.
""")
Beispiel #11
0
# published by the Free Software Foundation; either version 3 of the
# License, or (at your option) any later version.
#
# Indico is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
# General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with Indico; if not, see <http://www.gnu.org/licenses/>.

from indico.core.signals.event import _signals

sidemenu = _signals.signal(
    'sidemenu', """
Expected to return ``EventMenuEntry`` objects to be added to the event side menu.
A single entry can be returned directly, multiple entries must be yielded.
""")

deleted = _signals.signal(
    'deleted', """
Called when an event is deleted. The *sender* is the event object.
""")

data_changed = _signals.signal(
    'data-changed', """
Called when the basic data of an event is changed. The `sender` is the event,
and the following kwargs are available:

* `attr` - the changed attribute (`title`, `description`, `dates`, `start_date`, `end_date` or `location`)
* `old` - the old value
Beispiel #12
0
# published by the Free Software Foundation; either version 3 of the
# License, or (at your option) any later version.
#
# Indico is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
# General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with Indico; if not, see <http://www.gnu.org/licenses/>.

from indico.core.signals.event import _signals


sidemenu = _signals.signal('sidemenu', """
Expected to return ``MenuEntryData`` objects to be added to the event side menu.
A single entry can be returned directly, multiple entries must be yielded.
""")

deleted = _signals.signal('deleted', """
Called when an event is deleted. The *sender* is the event object.
The `user` kwarg contains the user performing the deletion if available.
""")

data_changed = _signals.signal('data-changed', """
Called when the basic data of an event is changed. The `sender` is the event,
and the following kwargs are available:

* `attr` - the changed attribute (`title`, `description`, `dates`, `start_date`, `end_date` or `location`)
* `old` - the old value
* `new` - the new value
Beispiel #13
0
# modify it under the terms of the GNU General Public License as
# published by the Free Software Foundation; either version 3 of the
# License, or (at your option) any later version.
#
# Indico is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
# General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with Indico; if not, see <http://www.gnu.org/licenses/>.

from indico.core.signals.event import _signals

contribution_created = _signals.signal(
    'contribution-created', """
Called when a new contribution is created. The `sender` is the new contribution.
""")

contribution_deleted = _signals.signal(
    'contribution-deleted', """
Called when a contribution is deleted. The *sender* is the contribution.
""")

contribution_updated = _signals.signal(
    'contribution-updated', """
Called when a contribution is modified. The *sender* is the contribution.
""")

subcontribution_created = _signals.signal(
    'subcontribution-created', """
Called when a new subcontribution is created. The `sender` is the new subcontribution.
Beispiel #14
0
# published by the Free Software Foundation; either version 3 of the
# License, or (at your option) any later version.
#
# Indico is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
# General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with Indico; if not, see <http://www.gnu.org/licenses/>.

from indico.core.signals.event import _signals


sidemenu = _signals.signal('sidemenu', """
Expected to return ``MenuEntryData`` objects to be added to the event side menu.
A single entry can be returned directly, multiple entries must be yielded.
""")

deleted = _signals.signal('deleted', """
Called when an event is deleted. The *sender* is the event object.
The `user` kwarg contains the user performing the deletion if available.
""")

updated = _signals.signal('updated', """
Called when basic data of an event is updated. The *sender* is the event.
A dict of changes is passed in the `changes` kwarg, with ``(old, new)``
tuples for each change. Note than the `person_links` change may happen
with `old` and `new` being the same lists for technical reasons. If the
key is present, it should be assumed that something changed (usually
the order or some data on the person link).
""")
Beispiel #15
0
# This file is part of Indico.
# Copyright (C) 2002 - 2022 CERN
#
# Indico is free software; you can redistribute it and/or
# modify it under the terms of the MIT License; see the
# LICENSE file for more details.

from indico.core.signals.event import _signals


abstract_created = _signals.signal('abstract-created', '''
Called when a new abstract is created. The `sender` is the new abstract.
''')

abstract_deleted = _signals.signal('abstract-deleted', '''
Called when an abstract is deleted. The *sender* is the abstract.
''')

abstract_state_changed = _signals.signal('abstract-state-changed', '''
Called when an abstract is withdrawn. The *sender* is the abstract.
''')

abstract_updated = _signals.signal('abstract-updated', '''
Called when an abstract is modified. The *sender* is the abstract.
''')
Beispiel #16
0
# published by the Free Software Foundation; either version 3 of the
# License, or (at your option) any later version.
#
# Indico is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
# General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with Indico; if not, see <http://www.gnu.org/licenses/>.

from indico.core.signals.event import _signals

contribution_created = _signals.signal(
    'contribution-created', """
Called when a new contribution is created. The `sender` is the new contribution,
its parent category is passed in the `parent` kwarg.
""")

contribution_deleted = _signals.signal(
    'contribution-deleted', """
Called when a contribution is deleted. The *sender* is the contribution, the parent
event is passed in the `parent` kwarg.
""")

contribution_title_changed = _signals.signal(
    'contribution-title-changed', """
Called when the title of a contribution is changed. The `sender` is the contribution,
the old/new titles are passed in the `old` and `new` kwargs.
""")
Beispiel #17
0
# This file is part of Indico.
# Copyright (C) 2002 - 2022 CERN
#
# Indico is free software; you can redistribute it and/or
# modify it under the terms of the MIT License; see the
# LICENSE file for more details.

from indico.core.signals.event import _signals

contribution_created = _signals.signal(
    'contribution-created', '''
Called when a new contribution is created. The `sender` is the new contribution.
''')

contribution_deleted = _signals.signal(
    'contribution-deleted', '''
Called when a contribution is deleted. The *sender* is the contribution.
''')

contribution_updated = _signals.signal(
    'contribution-updated', '''
Called when a contribution is modified. The *sender* is the contribution.
A dict containing ``old, new`` tuples for all changed values is passed
in the ``changes`` kwarg.
''')

subcontribution_created = _signals.signal(
    'subcontribution-created', '''
Called when a new subcontribution is created. The `sender` is the new subcontribution.
''')
Beispiel #18
0
# published by the Free Software Foundation; either version 3 of the
# License, or (at your option) any later version.
#
# Indico is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
# General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with Indico; if not, see <http://www.gnu.org/licenses/>.

from indico.core.signals.event import _signals

sidemenu = _signals.signal(
    'sidemenu', """
Expected to return ``MenuEntryData`` objects to be added to the event side menu.
A single entry can be returned directly, multiple entries must be yielded.
""")

deleted = _signals.signal(
    'deleted', """
Called when an event is deleted. The *sender* is the event object.
The `user` kwarg contains the user performing the deletion if available.
""")

updated = _signals.signal(
    'updated', """
Called when basic data of an event is updated. The *sender* is the event.
A dict of changes is passed in the `changes` kwarg, with ``(old, new)``
tuples for each change. Note than the `person_links` change may happen
with `old` and `new` being the same lists for technical reasons. If the
Beispiel #19
0
# This file is part of Indico.
# Copyright (C) 2002 - 2019 CERN
#
# Indico is free software; you can redistribute it and/or
# modify it under the terms of the MIT License; see the
# LICENSE file for more details.

from indico.core.signals.event import _signals

timetable_entry_created = _signals.signal(
    'timetable-entry-created', """
Called when a new timetable entry is created. The `sender` is the new entry.
""")

timetable_entry_updated = _signals.signal(
    'timetable-entry-updated', """
Called when a timetable entry is updated. The `sender` is the entry.
A dict containing ``old, new`` tuples for all changed values is passed
in the ``changes`` kwarg.
""")

timetable_entry_deleted = _signals.signal(
    'timetable-entry-deleted', """
Called when a timetable entry is deleted. The `sender` is the entry.
This signal is triggered right before the entry deletion is performed.
""")

times_changed = _signals.signal(
    'times-changed', """
Called when the times of a scheduled object (contribution, break or
session block) change, either by a change in duration or start time.
Beispiel #20
0
# published by the Free Software Foundation; either version 3 of the
# License, or (at your option) any later version.
#
# Indico is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
# General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with Indico; if not, see <http://www.gnu.org/licenses/>.

from indico.core.signals.event import _signals


contribution_created = _signals.signal('contribution-created', """
Called when a new contribution is created. The `sender` is the new contribution.
""")

contribution_deleted = _signals.signal('contribution-deleted', """
Called when a contribution is deleted. The *sender* is the contribution.
""")

contribution_updated = _signals.signal('contribution-updated', """
Called when a contribution is modified. The *sender* is the contribution.
""")


subcontribution_created = _signals.signal('subcontribution-created', """
Called when a new subcontribution is created. The `sender` is the new subcontribution.
""")