mirror of
https://github.com/cisagov/manage.get.gov.git
synced 2025-07-22 02:36:02 +02:00
Make flag appear by default
This commit is contained in:
parent
33e0c769ab
commit
87a3dee4ed
2 changed files with 8 additions and 8 deletions
|
@ -3579,6 +3579,14 @@ class WaffleFlagAdmin(FlagAdmin):
|
||||||
model = models.WaffleFlag
|
model = models.WaffleFlag
|
||||||
fields = "__all__"
|
fields = "__all__"
|
||||||
|
|
||||||
|
# Hack to get the dns_prototype_flag to auto populate when you navigate to
|
||||||
|
# the waffle flag page.
|
||||||
|
def changelist_view(self, request, extra_context=None):
|
||||||
|
if extra_context is None:
|
||||||
|
extra_context = {}
|
||||||
|
extra_context["dns_prototype_flag"] = flag_is_active_for_user(request.user, "dns_prototype_flag")
|
||||||
|
return super().changelist_view(request, extra_context=extra_context)
|
||||||
|
|
||||||
|
|
||||||
class DomainGroupAdmin(ListHeaderAdmin, ImportExportModelAdmin):
|
class DomainGroupAdmin(ListHeaderAdmin, ImportExportModelAdmin):
|
||||||
list_display = ["name", "portfolio"]
|
list_display = ["name", "portfolio"]
|
||||||
|
|
|
@ -459,15 +459,7 @@ class DomainDNSView(DomainBaseView):
|
||||||
def get_context_data(self, **kwargs):
|
def get_context_data(self, **kwargs):
|
||||||
"""Adds custom context."""
|
"""Adds custom context."""
|
||||||
context = super().get_context_data(**kwargs)
|
context = super().get_context_data(**kwargs)
|
||||||
object = self.get_object()
|
|
||||||
context["dns_prototype_flag"] = flag_is_active_for_user(self.request.user, "dns_prototype_flag")
|
context["dns_prototype_flag"] = flag_is_active_for_user(self.request.user, "dns_prototype_flag")
|
||||||
|
|
||||||
context["is_valid_domain_for_prototype"] = True
|
|
||||||
x = object.name == "igorville.gov"
|
|
||||||
print(f"what is the object? {object.name} and equal? {x}")
|
|
||||||
if settings.IS_PRODUCTION:
|
|
||||||
context["is_valid_domain_for_prototype"] = object.name == "igorville.gov"
|
|
||||||
|
|
||||||
return context
|
return context
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue