Repository: cisagov/manage.get.gov

Issue:
For initial launch, remove the ability for users in stable to create new requests
### Issue description

Our November users shouldn't have the ability to request new domain names since that's not opening until later. We should prevent them from starting a new request _in stable_ but it should stay in staging and individual sandboxes so it can continue to be tested.

(The solution here may be a feature flag with e.g., `open_requests=Y/N`.)

### Acceptance criteria

- [ ] Users in stable can't create a new domain request by clicking the "Start a new domain" button, because the button is disabled and greyed out.
- [ ] Users in stable CAN still create a new domain request by using the direct link
- [ ] In stable environment, add language above the "Start a new" button to indicate "Coming in 2024."

(other environments)
- [ ] Users in all other environments can create a new domain request


### Additional context

We could remove this button. We could also keep the button but remove the link behind it (though without updated text it could confuse users).

<img width="1232" alt="Screenshot 2023-10-23 at 1 59 21 PM" src="https://github.com/cisagov/getgov/assets/603901/b1bcff4a-ae9c-4897-b7ae-38e148af0290">


### Links to other issues

Relates to #1143 


Discussion:

Resolving patch:
diff --git a/src/registrar/config/settings.py b/src/registrar/config/settings.py
--- a/src/registrar/config/settings.py
+++ b/src/registrar/config/settings.py
@@ -46,6 +46,7 @@
 
 env_db_url = env.dj_db_url("DATABASE_URL")
 env_debug = env.bool("DJANGO_DEBUG", default=False)
+env_is_production = env.bool("IS_PRODUCTION", default=False)
 env_log_level = env.str("DJANGO_LOG_LEVEL", "DEBUG")
 env_base_url = env.str("DJANGO_BASE_URL")
 env_getgov_public_site_url = env.str("GETGOV_PUBLIC_SITE_URL", "")
@@ -73,6 +74,8 @@
 # SECURITY WARNING: don't run with debug turned on in production!
 DEBUG = env_debug
 
+# Controls production specific feature toggles
+IS_PRODUCTION = env_is_production
 
 # Applications are modular pieces of code.
 # They are provided by Django, by third-parties, or by yourself.
diff --git a/src/registrar/views/index.py b/src/registrar/views/index.py
--- a/src/registrar/views/index.py
+++ b/src/registrar/views/index.py
@@ -2,6 +2,7 @@
 from django.shortcuts import render
 
 from registrar.models import DomainApplication
+from django.conf import settings
 
 
 def index(request):
@@ -22,4 +23,5 @@ def index(request):
             state=F("domain__state"),
         )
         context["domains"] = domains
+        context["is_production"] = settings.IS_PRODUCTION
     return render(request, "home.html", context)


Test patch:
diff --git a/src/registrar/management/commands/generate_test_transition_domains.py b/src/registrar/management/commands/generate_test_transition_domains.py
--- a/src/registrar/management/commands/generate_test_transition_domains.py
+++ b/src/registrar/management/commands/generate_test_transition_domains.py
@@ -15,7 +15,7 @@ class Command(BaseCommand):
     # Running this script removes all existing transition domains, so use with caution.
     # Transition domains are created with email addresses provided as command line
     # argument. Email addresses for testing are passed as comma delimited list of
-    # email addresses, and are required to be provided.  Email addresses from the list
+    # email addresses, and are required to be provided. Email addresses from the list
     # are assigned to transition domains at time of creation.
 
     def add_arguments(self, parser):