API endpoint that enables a list of posts to be browsed including related models data and auxhiliary properties.

The configured endpoint purposefully does not permit a POST method as I do not want others creating new posts in the database.

GET /api/blog/posts/?format=api&offset=6
HTTP 200 OK
Allow: GET, HEAD, OPTIONS
Content-Type: application/json
Vary: Accept

{
    "count": 17,
    "next": "https://waynelambert.dev/api/blog/posts/?format=api&limit=3&offset=9",
    "previous": "https://waynelambert.dev/api/blog/posts/?format=api&limit=3&offset=3",
    "results": [
        {
            "id": 13,
            "title": "Implementing Binary Search Algorithm in Python",
            "slug": "binary-search-algorithm-python",
            "content": "<p>Binary search works based upon the process of eliminating any numbers that are either <strong>above an upper bound </strong>or <strong>below a lower bound</strong> that a number cannot be.</p>\r\n<p>Binary search is called binary search because it use the binary number sequence which starts from 1 and keeps on doubling. This uses the logarithmic scale with a base of 2.</p>\r\n<p>In maths, logarithms are the inverse of exponents. 2 to the power of 10 equals 1,024. Have you ever noticed this is how many bytes there are in a megabyte or how many megabytes there are in a gigagyte?</p>\r\n<p>As a further matter of interest to see how these numbers relate to things in computing, 2 to the power of 20 is 1,048,576 which is the number of rows there are in modern versions of Microsoft Excel spreadsheets so it turns out that the number of rows (and columns) wasn't just a number plucked out of the air.</p>\r\n<p>Binary numbers are everywhere in computing.</p>\r\n<p>In this example, I have asked someone to pick a number between 1 and a 1 million. For the purposes of the example, I have plucked 646,235 out of the air as being that chosen number. Since these are language agnostic concepts, I have then written some code in both Python and JavaScript which finds the number of guesses that it would take to arrive at that number using the binary search algorithm. I'll then illustrate the guessing process until the number is arrived at.</p>\r\n<p><u><strong>Python Implementation</strong></u></p>\r\n<div>\r\n<div>\r\n<div>\r\n<div>\r\n<div>\r\n<div>\r\n<div>\r\n<div>\r\n<div>\r\n<div>\r\n<div>\r\n<div>\r\n<div>\r\n<div tabindex=\"-1\" contenteditable=\"false\">\r\n<pre data-widget=\"codeSnippet\"><code class=\"language-python hljs\"># Calculates the number of `guesses` required to arrive at the `chosen_num`\r\n\r\nimport array\r\n\r\ndef binary_search(tmp_array, guess):\r\n    guess_count = 1\r\n    lower_bound = 0\r\n    upper_bound = len(tmp_array)\r\n\r\n    while lower_bound &lt;= upper_bound:\r\n        midpoint = (upper_bound + lower_bound) // 2\r\n\r\n        if guess &lt; midpoint:\r\n            upper_bound = midpoint - 1\r\n            guess_count += 1\r\n        elif guess &gt; midpoint:\r\n            lower_bound = midpoint + 1\r\n            guess_count += 1\r\n        elif guess == midpoint:\r\n            return guess_count\r\n\r\n\r\nmillion_item_array = array.array('i', (i for i in range(1, 1000001)))\r\nchosen_num = 646235\r\n\r\nnumber_of_guesses = binary_search(million_item_array, chosen_num)\r\n\r\nprint(f'It took {number_of_guesses} guesses to get to the right number.')</code></pre>\r\n</div>\r\n</div>\r\n</div>\r\n</div>\r\n</div>\r\n</div>\r\n</div>\r\n</div>\r\n</div>\r\n</div>\r\n</div>\r\n</div>\r\n</div>\r\n</div>\r\n<p>&nbsp;</p>\r\n<p><u><strong>JavaScript Implementation</strong></u></p>\r\n<div>\r\n<div>\r\n<div>\r\n<div>\r\n<div>\r\n<div>\r\n<div>\r\n<div>\r\n<div>\r\n<div>\r\n<div>\r\n<div>\r\n<div>\r\n<div tabindex=\"-1\" contenteditable=\"false\">\r\n<pre data-widget=\"codeSnippet\"><code class=\"language-javascript hljs\">// Calculates the number of `guesses` required to arrive at the `chosen_num`\r\n\r\nfunction binarySearch(tmpArray,guess) {\r\n  guessCount = 1;\r\n  lowerBound = 0;\r\n  upperBound = tmpArray.length;\r\n\r\n  while (lowerBound &lt;= upperBound) {\r\n    midpoint = Math.floor((upperBound + lowerBound) / 2)\r\n\r\n    if (guess &lt; midpoint) {\r\n      upperBound = midpoint - 1\r\n      guessCount += 1\r\n    };\r\n    if (guess &gt; midpoint) {\r\n      lowerBound = midpoint + 1\r\n      guessCount += 1\r\n    };\r\n    if (guess == midpoint) {\r\n      return guessCount\r\n    };\r\n  }\r\n}\r\n\r\nmillionItemArray = []\r\nfor (let i = 1; i &lt;= 1000001; i++) {\r\n  millionItemArray.push(i)\r\n}\r\nchosenNum = 646235\r\n\r\nnumberOfGuesses = binarySearch(millionItemArray, chosenNum)\r\n\r\nconsole.log(`It took ${numberOfGuesses} guesses to get to the right number.`);</code></pre>\r\n</div>\r\n</div>\r\n</div>\r\n</div>\r\n</div>\r\n</div>\r\n</div>\r\n</div>\r\n</div>\r\n</div>\r\n</div>\r\n</div>\r\n</div>\r\n</div>\r\n<p>Let's look at how the algorithm simulates the guessing process undertaken by a smart human in this game. The smart human chooses the quotient portion of the midpoint between the lower and upper bound on each guess they have. Again, the target is <strong>646,235.</strong></p>\r\n<table class=\"table table-sm table-striped\" border=\"1\" cellspacing=\"1\" cellpadding=\"1\">\r\n<tbody>\r\n<tr>\r\n<th scope=\"row\">Guess</th>\r\n<td><strong>Lower Bound</strong></td>\r\n<td><strong>Upper Bound</strong></td>\r\n<td><strong>Midpoint</strong></td>\r\n<td><strong>Chosen Num</strong></td>\r\n<td><strong>Action</strong></td>\r\n</tr>\r\n<tr>\r\n<th scope=\"row\">1</th>\r\n<td>0</td>\r\n<td>1,000,000</td>\r\n<td>500,000</td>\r\n<td>&gt; Midpoint</td>\r\n<td>Eliminate nums &lt;= midpoint</td>\r\n</tr>\r\n<tr>\r\n<th scope=\"row\">2</th>\r\n<td>500,001</td>\r\n<td>1,000,000</td>\r\n<td>750,000</td>\r\n<td>&lt; Midpoint</td>\r\n<td>Eliminate nums &gt;= midpoint</td>\r\n</tr>\r\n<tr>\r\n<th scope=\"row\">3</th>\r\n<td>500,001</td>\r\n<td>749,999</td>\r\n<td>625,000</td>\r\n<td>&gt; Midpoint</td>\r\n<td>Eliminate nums &lt;= midpoint</td>\r\n</tr>\r\n<tr>\r\n<th scope=\"row\">4</th>\r\n<td>625,001</td>\r\n<td>749,999</td>\r\n<td>687,500</td>\r\n<td>&lt; Midpoint</td>\r\n<td>Eliminate nums &gt;= midpoint</td>\r\n</tr>\r\n<tr>\r\n<th scope=\"row\">5</th>\r\n<td>625,001</td>\r\n<td>687,499</td>\r\n<td>656,250</td>\r\n<td>&lt; Midpoint</td>\r\n<td>Eliminate nums &gt;= midpoint</td>\r\n</tr>\r\n<tr>\r\n<th scope=\"row\">6</th>\r\n<td>625,001</td>\r\n<td>656,249</td>\r\n<td>640,625</td>\r\n<td>&gt; Midpoint</td>\r\n<td>Eliminate nums &lt;= midpoint</td>\r\n</tr>\r\n<tr>\r\n<th scope=\"row\">7</th>\r\n<td>640,626</td>\r\n<td>656,249</td>\r\n<td>648,437</td>\r\n<td>&lt; Midpoint</td>\r\n<td>Eliminate nums &gt;= midpoint</td>\r\n</tr>\r\n<tr>\r\n<th scope=\"row\">8</th>\r\n<td>640,626</td>\r\n<td>648,436</td>\r\n<td>644,531</td>\r\n<td>&gt; Midpoint</td>\r\n<td>Eliminate nums &lt;= midpoint</td>\r\n</tr>\r\n<tr>\r\n<th scope=\"row\">9</th>\r\n<td>644,532</td>\r\n<td>648,436</td>\r\n<td>646,484</td>\r\n<td>&gt; Midpoint</td>\r\n<td>Eliminate nums &lt;= midpoint</td>\r\n</tr>\r\n<tr>\r\n<th scope=\"row\">10</th>\r\n<td>644,532</td>\r\n<td>646,483</td>\r\n<td>645,507</td>\r\n<td>&lt; Midpoint</td>\r\n<td>Eliminate nums &gt;= midpoint</td>\r\n</tr>\r\n<tr>\r\n<th scope=\"row\">11</th>\r\n<td>645,508</td>\r\n<td>646,483</td>\r\n<td>645,995</td>\r\n<td>&gt; Midpoint</td>\r\n<td>Eliminate nums &lt;= midpoint</td>\r\n</tr>\r\n<tr>\r\n<th scope=\"row\">12</th>\r\n<td>645,996</td>\r\n<td>646,483</td>\r\n<td>646,239</td>\r\n<td>&lt; Midpoint</td>\r\n<td>Eliminate nums &gt;= midpoint</td>\r\n</tr>\r\n<tr>\r\n<th scope=\"row\">13</th>\r\n<td>645,996</td>\r\n<td>646,238</td>\r\n<td>646,117</td>\r\n<td>&gt; Midpoint</td>\r\n<td>Eliminate nums &lt;= midpoint</td>\r\n</tr>\r\n<tr>\r\n<th scope=\"row\">14</th>\r\n<td>646,118</td>\r\n<td>646,238</td>\r\n<td>646,178</td>\r\n<td>&gt; Midpoint</td>\r\n<td>Eluminate nums &lt;= midpoint</td>\r\n</tr>\r\n<tr>\r\n<th scope=\"row\">15</th>\r\n<td>646,179</td>\r\n<td>646,238</td>\r\n<td>646,208</td>\r\n<td>&gt; Midpoint</td>\r\n<td>Eliminate nums &lt;= midpoint</td>\r\n</tr>\r\n<tr>\r\n<th scope=\"row\">16</th>\r\n<td>646,209</td>\r\n<td>646,238</td>\r\n<td>646,223</td>\r\n<td>&gt; Midpoint</td>\r\n<td>Eliminate nums &lt;= midpoint</td>\r\n</tr>\r\n<tr>\r\n<th scope=\"row\">17</th>\r\n<td>646,224</td>\r\n<td>646,238</td>\r\n<td>646,231</td>\r\n<td>&gt; Midpoint</td>\r\n<td>Eliminate nums &lt;= midpoint</td>\r\n</tr>\r\n<tr>\r\n<th scope=\"row\">18</th>\r\n<td>646,232</td>\r\n<td>646,238</td>\r\n<td>646,235</td>\r\n<td>= Midpoint</td>\r\n<td>Found num on 18th guess!</td>\r\n</tr>\r\n</tbody>\r\n</table>\r\n<p>&nbsp;</p>\r\n<p>At step 12, their new guess is so close and they don't even know it!</p>\r\n<p>My computer was able to solve it a bit quicker than me. It took me about an hour to write this blog post and my computer did it in 0.162 seconds. I clearly must try harder!</p>\r\n<p><strong>So, how efficient is this algorithm?</strong></p>\r\n<p>Simply put, the greater the distance between the upper and lower bounds as a starting point, then the more efficient the algorithm becomes since many numbers can be eliminated within the first few guesses of the game (iterations of the while loop in the code). If you studied the numbers above, you will have noticed that more possible chosen numbers are eliminated at the start. In the example above, the first guess eliminates 500,000 possible numbers and the final&nbsp;guess only eliminated 7 numbers</p>\r\n<p>The algorithm is said to be an O(log n) algorithm where the logarithm has a base of 2.</p>\r\n<p>In mathematics, the logarithm of 626,235 with respect to the base of 2 is 19.26 (2d.p.). This can be calculated in a Python interpreter session as:</p>\r\n<div>\r\n<div>\r\n<div>\r\n<div>\r\n<div>\r\n<div>\r\n<div>\r\n<div>\r\n<div>\r\n<div>\r\n<div>\r\n<div>\r\n<pre><code class=\"language-python\">&gt;&gt;&gt; import math\r\n&gt;&gt;&gt; ans = math.log(626235,2)\r\n&gt;&gt;&gt; ans\r\n19.25634461676097</code></pre>\r\n</div>\r\n<img src=\"data:image/gif;base64,R0lGODlhAQABAPABAP///wAAACH5BAEKAAAALAAAAAABAAEAAAICRAEAOw==\" /></div>\r\nIf you wanted to guesstimate how many guesses (iterations) it would take for someone (or the algorithm) to arrive at the chosen number, then this is the calculation that you would undertake.</div>\r\n</div>\r\n</div>\r\n</div>\r\n</div>\r\n</div>\r\n<div>&nbsp;</div>\r\n</div>\r\n</div>\r\n</div>\r\n</div>\r\n<p><u><strong>Resources</strong></u></p>\r\n<p>Although not specifically about the binary search algorithm, for a really good half an hour talk on algorithms and Big-O notation, then I encourage you to check out the following talk by Ned Batcheldor at PyCon US 2018.</p>\r\n<p><a href=\"https://www.youtube.com/watch?v=duvZ-2UK0fc&amp;list=WL&amp;index=77&amp;t=0s\" target=\"_blank\" rel=\"noopener\">Big-O: How Code Slows as Data Grows</a></p>",
            "reference_url": "",
            "publish_date": "2019-08-31T09:25:18.994181Z",
            "updated_date": "2020-08-18T17:00:05.828127Z",
            "image": "https://wl-portfolio.s3.amazonaws.com/post_images/algorithm3.jpg",
            "status": "Publish",
            "word_count": 1122,
            "reading_time": 15,
            "post_absolute_url": "/blog/post/binary-search-algorithm-python/",
            "author_username": "wayne-lambert",
            "author_first_name": "Wayne",
            "author_last_name": "Lambert",
            "author_full_name": "Wayne Lambert",
            "author_initials": "WL",
            "author_display_name": "Wayne Lambert",
            "author_join_year": 2019,
            "author_view": 1,
            "author_created_date": "2019-07-21T10:02:09.888000Z",
            "author_updated_date": "2022-12-14T14:44:36.068604Z",
            "author_absolute_url": "/blog/users/wayne-lambert/profile/",
            "author_profile_picture": "https://wl-portfolio.s3.amazonaws.com/profile_pics/gravatar-500.jpg",
            "categories": [
                {
                    "id": 8,
                    "name": "Algorithms",
                    "slug": "algorithms",
                    "created_date": "2019-09-05T08:51:56.026246Z"
                },
                {
                    "id": 10,
                    "name": "Data Structures",
                    "slug": "data-structures",
                    "created_date": "2019-09-26T20:04:59.582866Z"
                },
                {
                    "id": 4,
                    "name": "JavaScript",
                    "slug": "javascript",
                    "created_date": "2019-07-27T21:39:47.440429Z"
                },
                {
                    "id": 9,
                    "name": "Python",
                    "slug": "python",
                    "created_date": "2019-09-05T09:25:47.465274Z"
                }
            ]
        },
        {
            "id": 16,
            "title": "Calculating Prime Numbers Algorithm in Python",
            "slug": "prime-numbers-algorithm-in-Python",
            "content": "<p>Another common puzzle used to develop your coding skills is to use your chosen language to find all of the prime numbers between any given range. This range would usually start from 2 since the rules of being a prime number is that the number should only be divisible by one and itself. The number 100 is a typical arbitrary figure chosen as this was commonly cited during schooling years.</p>\r\n\r\n<p>As a general approach to the problem at hand, this involves looping over each of the numbers in the range (in this example, from 2 to 100). Within that loop, loop over each of the numbers (between 2 and itself) to check if the number being tested is divisible by any other number between 2 and itself. This is done using modulo arithmetic.</p>\r\n\r\n<p>If the operation finds any instance where there is a remainder, then the number is not considered a prime number. If all of the numbers within the range have been tested and there are no numbers that had a remainder component, then it is considered to be a prime number and it is appended to the prime numbers list within the master function.</p>\r\n\r\n<p>Here is an implementation in Python:</p>\r\n\r\n<div>\r\n<pre>\r\n<code class=\"language-python\">def is_prime(number):\r\n    \"\"\" Determines whether given number is prime or not \"\"\"\r\n    for factor in range(2, number):\r\n        if number % factor == 0:\r\n            return False\r\n        return True\r\n\r\nprime_numbers = []\r\ndef get_prime_numbers(max_num):\r\n    \"\"\" Builds list of prime numbers up to a maximum of max_num \"\"\"\r\n    for tested_num in range(2, max_num):\r\n        if is_prime(tested_num):\r\n            prime_numbers.append(tested_num)\r\n    return prime_numbers\r\n\r\n\r\nif __name__ == '__main__':\r\n    prime_numbers = get_prime_numbers(100)\r\n    print(prime_numbers)</code></pre>\r\n</div>\r\n\r\n<p>&nbsp;</p>\r\n\r\n<p>Here is the same implementation written in JavaScript:</p>\r\n\r\n<div>\r\n<pre>\r\n<code class=\"language-javascript\">// List prime numbers between 2 and 100\r\n\r\nprimeNumbers = []\r\n\r\nfunction isPrime(number) {\r\n   ` Determines whether given number is prime or not `\r\n  for (let factor = 2; factor &lt; number; factor++){\r\n       if(number % factor == 0){\r\n          return false;\r\n       }\r\n   }\r\n   return true;\r\n}\r\n\r\nfunction getPrimeNumbers(maxNum) {\r\n  ` Builds list of prime numbers up to a maximum of maxNum `\r\n  for(let testedNum = 2; testedNum &lt;= maxNum; testedNum++) {\r\n      if(isPrime(testedNum)){\r\n        primeNumbers.push(testedNum)\r\n        console.log(primeNumbers);\r\n    }\r\n  }\r\n}\r\n\r\nprimeNumbers = getPrimeNumbers(100);</code></pre>\r\n</div>",
            "reference_url": "",
            "publish_date": "2019-09-06T13:58:05.410044Z",
            "updated_date": "2020-07-03T15:21:52.946584Z",
            "image": "https://wl-portfolio.s3.amazonaws.com/post_images/algorithm4.png",
            "status": "Publish",
            "word_count": 361,
            "reading_time": 5,
            "post_absolute_url": "/blog/post/prime-numbers-algorithm-in-Python/",
            "author_username": "wayne-lambert",
            "author_first_name": "Wayne",
            "author_last_name": "Lambert",
            "author_full_name": "Wayne Lambert",
            "author_initials": "WL",
            "author_display_name": "Wayne Lambert",
            "author_join_year": 2019,
            "author_view": 1,
            "author_created_date": "2019-07-21T10:02:09.888000Z",
            "author_updated_date": "2022-12-14T14:44:36.068604Z",
            "author_absolute_url": "/blog/users/wayne-lambert/profile/",
            "author_profile_picture": "https://wl-portfolio.s3.amazonaws.com/profile_pics/gravatar-500.jpg",
            "categories": [
                {
                    "id": 8,
                    "name": "Algorithms",
                    "slug": "algorithms",
                    "created_date": "2019-09-05T08:51:56.026246Z"
                },
                {
                    "id": 10,
                    "name": "Data Structures",
                    "slug": "data-structures",
                    "created_date": "2019-09-26T20:04:59.582866Z"
                },
                {
                    "id": 4,
                    "name": "JavaScript",
                    "slug": "javascript",
                    "created_date": "2019-07-27T21:39:47.440429Z"
                },
                {
                    "id": 9,
                    "name": "Python",
                    "slug": "python",
                    "created_date": "2019-09-05T09:25:47.465274Z"
                }
            ]
        },
        {
            "id": 10,
            "title": "Configure Heroku App with Google Domains and SSL",
            "slug": "configure-heroku-app-google-domains-and-ssl",
            "content": "<p>Setting up your Heroku app to play nicely with your Google Domains is no trivial task. There are several settings that need to be just so in order for this to work properly. This guide will walk you through the entire process.</p>\r\n\r\n<p><strong>Pre-requisites</strong></p>\r\n\r\n<ul>\r\n\t<li>A domain name that is being managed by the Google Domains service.</li>\r\n\t<li>The lowest entry level paid subscription for a Heroku dyno (currently the &#39;hobby&#39; dyno priced at $7/month as a publish date). This is required for the SSL certificate.</li>\r\n\t<li>Your app will need to be successfully deployed. This means that your <strong>&#39;Activity Feed&#39;</strong> section should display as <strong>&#39;Deployed&#39;</strong> and have a commit ID. If you&#39;re using Docker, it is possible for the build to succeed and for your app to be available at <strong>https://&lt;your-app-name&gt;.herokuapp.com</strong> but the deployment actually failed. This can be a bit confusing at first as it seems as though everything is OK.</li>\r\n</ul>\r\n\r\n<p>&nbsp;</p>\r\n\r\n<p>First up, let&#39;s take the steps required within Heroku.</p>\r\n\r\n<p>Within the &#39;settings&#39; tab of your Heroku app&#39;s dashboard area (found at: <strong>https://dashboard.heroku.com/apps/&lt;your-app-name&gt;/settings</strong>), go down to the <strong>&#39;Domains and certificates&#39;</strong> section.</p>\r\n\r\n<p>Click on the <strong>&#39;Configure SSL&#39;</strong> button and choose <strong>&#39;Automatically&#39;</strong>.</p>\r\n\r\n<p>Now, let&#39;s set up the domains...</p>\r\n\r\n<p>Click on <strong>&#39;Add domain&#39;</strong>.</p>\r\n\r\n<p>Enter your first top level domain. For example, <strong>&lt;your-domain-name&gt;.com</strong>.</p>\r\n\r\n<p>Click on <strong>&#39;Add domain&#39;</strong> again.</p>\r\n\r\n<p>This time, enter another record but preceded with <strong>www.&nbsp;&nbsp;</strong> For example, <strong>www.&lt;your-domain-name&gt;.com</strong>.</p>\r\n\r\n<p>Entering each of these will generate a <strong>DNS Target</strong> and and <strong>ACM Status</strong>. The <strong>ACM Status</strong> will resolve as <strong>&#39;OK&#39;</strong> with a green tick once the SSL certificate is successfully resolved.</p>\r\n\r\n<p>Copy the entire text string for the <strong>DNS target</strong> for the www record that you created. For now, put it in your notes app.</p>\r\n\r\n<p>Now, let&#39;s head over to your Google Domains account and log in.</p>\r\n\r\n<p>Click on <strong>&#39;DNS&#39;</strong> on the left-hand side.</p>\r\n\r\n<p>Ensure that the <strong>&#39;Name servers&#39;</strong> section is selected as <strong>&#39;Use the Google Domains name servers&#39;</strong></p>\r\n\r\n<p>For the <strong>&#39;DNSSEC&#39;</strong> section, click on <strong>&#39;ENABLE DNSSEC&#39;</strong> if you are using a domain that requires DNSSEC. For example .dev domains (like mine) require this.</p>\r\n\r\n<p>Add a record under <strong>&#39;Synthetic records&#39;</strong> section for subdomain forwarding using the following settings.</p>\r\n\r\n<ul>\r\n\t<li><strong>Subdomain forward</strong></li>\r\n\t<li>Subdomain: <strong>@</strong></li>\r\n\t<li>Destination URL: <strong>https://www.&lt;your-domain-name&gt;.com</strong></li>\r\n\t<li><strong>Permanent redirect (301)</strong></li>\r\n\t<li><strong>Forward path</strong></li>\r\n\t<li><strong>Enable SSL</strong></li>\r\n</ul>\r\n\r\n<p>&nbsp;</p>\r\n\r\n<p>The next step is to add a CNAME record within the <strong>&#39;Custom resource records&#39;</strong> section.</p>\r\n\r\n<ul>\r\n\t<li>Name: <strong>www</strong></li>\r\n\t<li>Type: <strong>CNAME</strong></li>\r\n\t<li>TTL: <strong>600</strong> (This will resolve itself as <strong>10m</strong> when you save the record</li>\r\n\t<li>Data: This is the <strong>DNS Target</strong> URL that you copied onto your notes app in a previous step. This also includes a dot (period) after the .com. This is expected and should be included within the entry for the CNAME record. It will look something like <strong>stuffed-turkey-hfy4jlvrfxmdk6yfzlmny39h.herokudns.com</strong></li>\r\n</ul>\r\n\r\n<p>&nbsp;</p>\r\n\r\n<p>Once all of these steps have been completed, you will need to <u>wait about 15 minutes for everything to propagate</u>. Once everything is working, you should be able to try each of the combinations within your browser&#39;s address bar or using the <strong>curl</strong> command (MacOS and Linux) and you will be redirected to the <strong>https://www.&lt;your-domain-name&gt;.com</strong> variant of your site.</p>\r\n\r\n<pre>\r\n<code class=\"language-bash\">$ curl &lt;your-domain-name&gt;.com</code></pre>\r\n\r\n<pre>\r\n<code class=\"language-bash\">$ curl http://&lt;your-domain-name&gt;.com</code></pre>\r\n\r\n<p>should return...</p>\r\n\r\n<pre>\r\n<code class=\"language-html\">&lt;HTML&gt;\r\n  &lt;HEAD&gt;\r\n    &lt;meta http-equiv=\"content-type\" content=\"text/html;charset=utf-8\"&gt;\r\n    &lt;TITLE&gt;301 Moved&lt;/TITLE&gt;\r\n  &lt;/HEAD&gt;\r\n  &lt;BODY&gt;\r\n    &lt;H1&gt;301 Moved&lt;/H1&gt;\r\n    The document has moved\r\n    &lt;A HREF=\"https://&lt;your-domain-name&gt;/\"&gt;here&lt;/A&gt;.\r\n  &lt;/BODY&gt;\r\n&lt;/HTML&gt;</code></pre>\r\n\r\n<p>The above snippet shows that the 301 permanent redirect you entered as a synthetic record in your Google Domains account is working.</p>\r\n\r\n<pre>\r\n<code class=\"language-bash\">$ curl https://www.&lt;your-domain-name&gt;.com</code></pre>\r\n\r\n<p>&nbsp;Curling the above url should return the HTML content for your site&#39;s home page.</p>\r\n\r\n<p>That&#39;s it! You should now have your Heroku app set up with your custom domain name.</p>",
            "reference_url": "",
            "publish_date": "2019-08-02T13:29:37.648224Z",
            "updated_date": "2020-07-02T19:36:03.712914Z",
            "image": "https://wl-portfolio.s3.amazonaws.com/post_images/django-heroku-google-domains.png",
            "status": "Publish",
            "word_count": 603,
            "reading_time": 9,
            "post_absolute_url": "/blog/post/configure-heroku-app-google-domains-and-ssl/",
            "author_username": "wayne-lambert",
            "author_first_name": "Wayne",
            "author_last_name": "Lambert",
            "author_full_name": "Wayne Lambert",
            "author_initials": "WL",
            "author_display_name": "Wayne Lambert",
            "author_join_year": 2019,
            "author_view": 1,
            "author_created_date": "2019-07-21T10:02:09.888000Z",
            "author_updated_date": "2022-12-14T14:44:36.068604Z",
            "author_absolute_url": "/blog/users/wayne-lambert/profile/",
            "author_profile_picture": "https://wl-portfolio.s3.amazonaws.com/profile_pics/gravatar-500.jpg",
            "categories": [
                {
                    "id": 7,
                    "name": "Infrastructure",
                    "slug": "infrastructure",
                    "created_date": "2019-08-02T13:33:45.888597Z"
                }
            ]
        }
    ]
}