1
0
mirror of https://github.com/peeringdb/peeringdb.git synced 2024-05-11 05:55:09 +00:00
Files
peeringdb-peeringdb/docs/dev/modules/signals.py.md
Matt Griswold 505760aa8d Support 202203 (#1144)
* Do not show objects in status "pending" on the UI #784

* Fix peeringdb.js bug introduced in #784

* 500 Error during login for 2FA enabled accounts with unverified email address #996

* Django-Admin: adding a network with existing asn fails with internal error #1035

* Some command-line-tool executions are not logged #1119

* Ops: API throttling of repeated requests #1126

* Ops: response header X-Auth-ID to augment logging #1120

* Allow rate-limiting of melissa enabled api functionality. #1124

* State / Province normalization #1079

* Log melissa requests #1122

* remove debug messages

* bump django-handleref to 1.0.2

* Need consolidated app logs #845

* pin django peeringdb to 2.13 and relock poetry

* pin django-restframework-apikey to 2.1.0

* linting

* migrations

* docs regenerate

* docs

* linting

Co-authored-by: David Poarch <dpoarch@20c.com>
Co-authored-by: Stefan Pratter <stefan@20c.com>
2022-04-12 15:39:19 -05:00

85 lines
2.2 KiB
Markdown

Generated from signals.py on 2022-04-12 16:41:02.631987
# peeringdb_server.signals
Django signal handlers
- org usergroup creation
- entity count updates (fac_count, net_count etc.)
- geocode when address model (org, fac) is saved
- verification queue creation on new objects
- asn rdap automation to automatically grant org / network to user
- user to org affiliation handling when targeted org has no users
- notify admin-com
- CORS enabling for GET api requests
# Functions
---
## addressmodel_save
`def addressmodel_save(sender, instance=None, **kwargs)`
Mark address model objects for geocode sync if one of the address
fields is updated.
---
## new_user_to_guests
`def new_user_to_guests(request, user, sociallogin=None, **kwargs)`
When a user is created via oauth login put them in the guest
group temporarily.
If pdb_settings.AUTO_VERIFY_USERS is toggled on in the settings, users get automatically verified (Note: this does
not include email verification, they will still need to do that).
---
## org_delete
`def org_delete(sender, instance, **kwargs)`
When an organization is HARD deleted, remove any
usergroups tied to the organization.
---
## org_save
`def org_save(sender, **kwargs)`
Create a user group for an organization when that
organization is created.
---
## uoar_creation
`def uoar_creation(sender, instance, created=False, **kwargs)`
Notify the approporiate management entity when a user to organization affiliation request is created.
Attempt to derive the targeted organization
from the ASN the user provided.
---
## update_counts_for_ixfac
`def update_counts_for_ixfac(ixfac)`
Whenever a ixfac is saved, update the fac_count for the related Exchange
and update ix_count for the related Facility.
---
## update_counts_for_netfac
`def update_counts_for_netfac(netfac)`
Whenever a netfac is saved, update the fac_count for the related Network
and update net_count for the related Facility.
---
## update_counts_for_netixlan
`def update_counts_for_netixlan(netixlan)`
Whenever a netixlan is saved, update the ix_count for the related Network
and update net_count for the related InternetExchange.
---
## update_network_attribute
`def update_network_attribute(instance, attribute)`
Updates 'attribute' field in Network whenever it's called.
---