apps.py 476 B

1234567891011121314151617
  1. from django.apps import AppConfig
  2. from django.dispatch import Signal
  3. from .utilities import send_activation_notification
  4. user_registered = Signal('instance')
  5. def user_registered_dispatcher(sender, **kwargs):
  6. send_activation_notification(kwargs['instance'])
  7. user_registered.connect(user_registered_dispatcher)
  8. class MainConfig(AppConfig):
  9. default_auto_field = 'django.db.models.BigAutoField'
  10. name = 'main'
  11. verbose_name = 'Доска объявлений'