|
387 | 387 | # for example: OPEN_URLS = ['/', '/about'] |
388 | 388 | OPEN_URLS = ['/snex2/tnstargets/', '/pipeline-upload/photometry-upload/'] |
389 | 389 |
|
390 | | -HOOKS = { |
391 | | - 'target_post_save': 'custom_code.hooks.target_post_save', |
392 | | - 'observation_change_state': 'tom_common.hooks.observation_change_state', |
393 | | - 'targetextra_post_save': 'custom_code.hooks.targetextra_post_save', |
394 | | - 'targetname_post_save': 'custom_code.hooks.targetname_post_save', |
395 | | - 'sync_observation_with_snex1': 'custom_code.hooks.sync_observation_with_snex1', |
396 | | - 'sync_sequence_with_snex1': 'custom_code.hooks.sync_sequence_with_snex1', |
397 | | - 'cancel_sequence_in_snex1': 'custom_code.hooks.cancel_sequence_in_snex1', |
398 | | - 'update_reminder_in_snex1': 'custom_code.hooks.update_reminder_in_snex1', |
399 | | - 'approve_sequence_in_snex1': 'custom_code.hooks.approve_sequence_in_snex1', |
400 | | - 'find_images_from_snex1': 'custom_code.hooks.find_images_from_snex1', |
401 | | - 'change_interest_in_snex1': 'custom_code.hooks.change_interest_in_snex1', |
402 | | - 'sync_paper_with_snex1': 'custom_code.hooks.sync_paper_with_snex1', |
403 | | - 'sync_comment_with_snex1': 'custom_code.hooks.sync_comment_with_snex1', |
404 | | - 'cancel_gw_obs': 'gw.hooks.cancel_gw_obs', |
405 | | - 'ingest_gw_galaxy_into_snex1': 'gw.hooks.ingest_gw_galaxy_into_snex1', |
406 | | - 'sync_users_with_snex1': 'custom_code.hooks.sync_users_with_snex1', |
407 | | -} |
| 390 | +if DEBUG: |
| 391 | + HOOKS = { |
| 392 | + 'target_post_save': '', |
| 393 | + 'observation_change_state': '', |
| 394 | + 'targetextra_post_save': '', |
| 395 | + 'targetname_post_save': '', |
| 396 | + 'sync_observation_with_snex1': '', |
| 397 | + 'sync_sequence_with_snex1': '', |
| 398 | + 'cancel_sequence_in_snex1': '', |
| 399 | + 'update_reminder_in_snex1': '', |
| 400 | + 'approve_sequence_in_snex1': '', |
| 401 | + 'find_images_from_snex1': '', |
| 402 | + 'change_interest_in_snex1': '', |
| 403 | + 'sync_paper_with_snex1': '', |
| 404 | + 'sync_comment_with_snex1': '', |
| 405 | + 'cancel_gw_obs': '', |
| 406 | + 'ingest_gw_galaxy_into_snex1': '', |
| 407 | + 'sync_users_with_snex1': '', |
| 408 | + } |
| 409 | +else: |
| 410 | + HOOKS = { |
| 411 | + 'target_post_save': 'custom_code.hooks.target_post_save', |
| 412 | + 'observation_change_state': 'tom_common.hooks.observation_change_state', |
| 413 | + 'targetextra_post_save': 'custom_code.hooks.targetextra_post_save', |
| 414 | + 'targetname_post_save': 'custom_code.hooks.targetname_post_save', |
| 415 | + 'sync_observation_with_snex1': 'custom_code.hooks.sync_observation_with_snex1', |
| 416 | + 'sync_sequence_with_snex1': 'custom_code.hooks.sync_sequence_with_snex1', |
| 417 | + 'cancel_sequence_in_snex1': 'custom_code.hooks.cancel_sequence_in_snex1', |
| 418 | + 'update_reminder_in_snex1': 'custom_code.hooks.update_reminder_in_snex1', |
| 419 | + 'approve_sequence_in_snex1': 'custom_code.hooks.approve_sequence_in_snex1', |
| 420 | + 'find_images_from_snex1': 'custom_code.hooks.find_images_from_snex1', |
| 421 | + 'change_interest_in_snex1': 'custom_code.hooks.change_interest_in_snex1', |
| 422 | + 'sync_paper_with_snex1': 'custom_code.hooks.sync_paper_with_snex1', |
| 423 | + 'sync_comment_with_snex1': 'custom_code.hooks.sync_comment_with_snex1', |
| 424 | + 'cancel_gw_obs': 'gw.hooks.cancel_gw_obs', |
| 425 | + 'ingest_gw_galaxy_into_snex1': 'gw.hooks.ingest_gw_galaxy_into_snex1', |
| 426 | + 'sync_users_with_snex1': 'custom_code.hooks.sync_users_with_snex1', |
| 427 | + } |
408 | 428 |
|
409 | 429 |
|
410 | 430 | BROKERS = { |
|
497 | 517 | 'REGISTRATION_AUTHENTICATION_BACKEND': 'django.contrib.auth.backends.AllowAllUsersModelBackend', |
498 | 518 | 'REGISTRATION_REDIRECT_PATTERN': 'home', |
499 | 519 | 'REGISTRATION_STRATEGY': 'approval_required', |
500 | | - 'SEND_APPROVAL_EMAILS': False, |
| 520 | + 'SEND_APPROVAL_EMAILS': True, |
501 | 521 | 'APPROVAL_SUBJECT': f'Your {TOM_NAME} registration has been approved!', # Optional subject line of approval email, (Default Shown) |
502 | 522 | 'APPROVAL_MESSAGE': f'Your {TOM_NAME} registration has been approved. You can log in <a href="mytom.com/login">here</a>.' # Optional html-enabled body for approval email, (Default Shown) |
503 | 523 | } |
|
506 | 526 | ('SNEx Secure', 'sne@lco.global') |
507 | 527 | ] |
508 | 528 |
|
| 529 | +MANAGERS = [("SNe", "sne@lco.global")] |
| 530 | +EMAIL_SUBJECT_PREFIX = f'[{TOM_NAME}]' |
509 | 531 | EMAIL_HOST = 'smtp.gmail.com' |
510 | | - |
511 | 532 | EMAIL_PORT = 587 |
512 | | - |
513 | 533 | EMAIL_USE_TLS = True |
514 | | - |
| 534 | +EMAIL_USE_SSL = False |
515 | 535 | EMAIL_HOST_USER = 'snex@lco.global' |
516 | | - |
517 | 536 | EMAIL_HOST_PASSWORD = str(os.getenv('SNEX_EMAIL_PASSWORD', '')) |
| 537 | +EMAIL_BACKEND = "django.core.mail.backends.smtp.EmailBackend" |
518 | 538 |
|
519 | 539 | DATA_UPLOAD_MAX_MEMORY_SIZE = 7000000 |
520 | 540 |
|
|
0 commit comments