title: How do I Send Request to EndPoint on application Startup
body: <p>I am working on a Django project which has an API endpoint that receives a post request and sends a welcome email to the registered user, currently, I have to use a form to send this request to the endpoint, is there a way to manually read the email and name from my environmental variable and send a request once I run the app the first time? something like </p>
  
  <pre><code>EMAIL = 'try@test.com'
  NAME = 'Bob'
  </code></pre>
  
  <p>I have this stored as an env variable already</p>
  
  <p>and here is my current code</p>
  
  <pre><code>@require_http_methods(["POST"])
  @login_required
  def add_user(request):
      if request.is_ajax():
          name = request.POST.get('name')
          email = request.POST.get('email')
          if not BlueUsers.objects.filter(user_email=email).exists():
              newuser_obj = BlueUsers.objects.create(user_name=name, user_email=email)
              conf_obj = Config.objects.first()
              if conf_obj:
                  post_url = "{}/priv/create-user/".format(conf_obj.hostname)
                  data = {
                      'name': newuser_obj.user_name,
                      'email': newuser_obj.user_email,
                      'redtree_user_id': newuser_obj.id
                  }
                  headers = {'data-auth-key': conf_obj.authentication_token}
                  try:
                      response = requests.post(post_url, data=data, headers=headers)
                  except:
                      response = None
  
  </code></pre>
  
  <p>I have been struggling with this </p>