More cleanup

This commit is contained in:
zandercymatics 2024-05-31 13:19:41 -06:00
parent d8265dd423
commit be68c8f562
No known key found for this signature in database
GPG key ID: FF4636ABEC9682B7
2 changed files with 5 additions and 17 deletions

View file

@ -406,10 +406,8 @@ This function is triggered by the post_save event on the User model, designed to
2. For Existing Users: For users logging in subsequent times, the function ensures that any updates from Login.gov are applied to the associated User record. However, it does not alter any existing Contact records.
## Disable email sending (toggling the disable_email_sending switch)
Feature switches are booleans that behave like environment variables that you can toggle through the DB.
This switch globally disables our email sending feature. Using it is as simple as checking a box.
## Disable email sending (toggling the disable_email_sending flag)
1. On the app, navigate to `\admin`.
2. Under models, click `Waffle switches`.
2. Under models, click `Waffle flags`.
3. Click the `disable_email_sending` record. This should exist by default, if not - create one with that name.
4. (Important) Enable the checkbox for the field `Active`. This field overrides all other settings
4. (Important) Set the field `everyone` to `Yes`. This field overrides all other settings

View file

@ -2317,16 +2317,6 @@ class WaffleFlagAdmin(FlagAdmin):
fields = "__all__"
class WaffleSwitchAdmin(SwitchAdmin):
"""Custom admin implementation of django-waffle's Switch class"""
class Meta:
"""Contains meta information about this class"""
model = models.WaffleSwitch
fields = "__all__"
admin.site.unregister(LogEntry) # Unregister the default registration
admin.site.register(LogEntry, CustomLogEntryAdmin)
@ -2352,7 +2342,7 @@ admin.site.register(models.VerifiedByStaff, VerifiedByStaffAdmin)
# Register our custom waffle implementations
admin.site.register(models.WaffleFlag, WaffleFlagAdmin)
admin.site.register(models.WaffleSwitch, WaffleSwitchAdmin)
# Unregister Sample from the waffle library
# Unregister Switch and Sample from the waffle library
admin.site.unregister(Switch)
admin.site.unregister(Sample)