@@ -262,7 +262,7 @@ Environment variables also have the advantage of working for non-Django stuff to
262
262
263
263
==== Setting DEBUG=True and SECRET_KEY
264
264
265
- There's lots of ways you might do this.
265
+ There are lots of ways you might do this.
266
266
Here's what I propose; it may seem a little fiddly,
267
267
but I'll provide a little justification for each choice.
268
268
Let them be an inspiration (but not a template) for your own choices!
@@ -306,7 +306,7 @@ TIP: Better to fail hard than allow a typo in an environment variable name to
306
306
307
307
==== Setting environment variables inside the Dockerfile
308
308
309
- Now let's set that environment variable in our Dockerfile using then `ENV` directive:
309
+ Now let's set that environment variable in our Dockerfile using the `ENV` directive:
310
310
311
311
[role="sourcecode"]
312
312
.Dockerfile (ch10l006)
@@ -402,7 +402,7 @@ image::images/search-results-400-bad-request.png["Duckduckgo search results with
402
402
`ALLOWED_HOSTS` is a security setting
403
403
designed to reject requests that are likely to be forged, broken or malicious
404
404
because they don't appear to be asking for your site
405
- (HTTP request contain the address they were intended for in a header called "Host").
405
+ (HTTP requests contain the address they were intended for in a header called "Host").
406
406
407
407
By default, when DEBUG=True, `ALLOWED_HOSTS` effectively allows _localhost_,
408
408
our own machine, so that's why it was working OK until now.
@@ -564,7 +564,7 @@ but it's more of shock to see that they are no longer appearing in the terminal
564
564
If you're like me you might find yourself wondering if we really _did_ see them earlier
565
565
and starting to doubt your own sanity.
566
566
But the explanation is that Django's
567
- https://docs.djangoproject.com/en/5.0 /ref/logging/#default-logging-configuration[default logging configuration]
567
+ https://docs.djangoproject.com/en/4.2 /ref/logging/#default-logging-configuration[default logging configuration]
568
568
changes when DEBUG is turned off:
569
569
570
570
This means we need to interact with the standard library's `logging` module,
@@ -577,7 +577,7 @@ but sometimes you just wanna say "just print stuff to stdout pls",
577
577
and you wish that configuring the simplest thing was a little easier].
578
578
579
579
Here's pretty much the simplest possible logging config
580
- which just prints everything to the console (ie standard out).
580
+ which just prints everything to the console (i.e. standard out).
581
581
582
582
583
583
[role="sourcecode"]
0 commit comments