mirror of
https://github.com/cisagov/manage.get.gov.git
synced 2025-05-19 10:59:21 +02:00
More cleanup
This commit is contained in:
parent
d8265dd423
commit
be68c8f562
2 changed files with 5 additions and 17 deletions
|
@ -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.
|
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)
|
## Disable email sending (toggling the disable_email_sending flag)
|
||||||
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.
|
|
||||||
1. On the app, navigate to `\admin`.
|
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.
|
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
|
|
@ -2317,16 +2317,6 @@ class WaffleFlagAdmin(FlagAdmin):
|
||||||
fields = "__all__"
|
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.unregister(LogEntry) # Unregister the default registration
|
||||||
|
|
||||||
admin.site.register(LogEntry, CustomLogEntryAdmin)
|
admin.site.register(LogEntry, CustomLogEntryAdmin)
|
||||||
|
@ -2352,7 +2342,7 @@ admin.site.register(models.VerifiedByStaff, VerifiedByStaffAdmin)
|
||||||
|
|
||||||
# Register our custom waffle implementations
|
# Register our custom waffle implementations
|
||||||
admin.site.register(models.WaffleFlag, WaffleFlagAdmin)
|
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)
|
admin.site.unregister(Sample)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue