From be402891cd78f484b7f67e486924975523516ced Mon Sep 17 00:00:00 2001 From: Ahmed Nassar Date: Mon, 14 Apr 2025 14:12:56 -0300 Subject: Fixed #36311 -- Unified spelling of "hardcode" and its variants in docs. Co-authored-by: Natalia <124304+nessita@users.noreply.github.com> --- docs/topics/cache.txt | 2 +- docs/topics/class-based-views/generic-display.txt | 2 +- docs/topics/http/urls.txt | 2 +- docs/topics/testing/advanced.txt | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) (limited to 'docs/topics') diff --git a/docs/topics/cache.txt b/docs/topics/cache.txt index ae880bbc2f..3f8c00d160 100644 --- a/docs/topics/cache.txt +++ b/docs/topics/cache.txt @@ -726,7 +726,7 @@ Additionally, ``cache_page`` automatically sets ``Cache-Control`` and Specifying per-view cache in the URLconf ---------------------------------------- -The examples in the previous section have hard-coded the fact that the view is +The examples in the previous section have hardcoded the fact that the view is cached, because ``cache_page`` alters the ``my_view`` function in place. This approach couples your view to the cache system, which is not ideal for several reasons. For instance, you might want to reuse the view functions on another, diff --git a/docs/topics/class-based-views/generic-display.txt b/docs/topics/class-based-views/generic-display.txt index fd3f3c78c9..81c800e213 100644 --- a/docs/topics/class-based-views/generic-display.txt +++ b/docs/topics/class-based-views/generic-display.txt @@ -316,7 +316,7 @@ Dynamic filtering ----------------- Another common need is to filter down the objects given in a list page by some -key in the URL. Earlier we hard-coded the publisher's name in the URLconf, but +key in the URL. Earlier we hardcoded the publisher's name in the URLconf, but what if we wanted to write a view that displayed all the books by some arbitrary publisher? diff --git a/docs/topics/http/urls.txt b/docs/topics/http/urls.txt index d8de9635ec..d92beb3394 100644 --- a/docs/topics/http/urls.txt +++ b/docs/topics/http/urls.txt @@ -556,7 +556,7 @@ in their final forms either for embedding in generated content (views and assets URLs, URLs shown to the user, etc.) or for handling of the navigation flow on the server side (redirections, etc.) -It is strongly desirable to avoid hard-coding these URLs (a laborious, +It is strongly desirable to avoid hardcoding these URLs (a laborious, non-scalable and error-prone strategy). Equally dangerous is devising ad-hoc mechanisms to generate URLs that are parallel to the design described by the URLconf, which can result in the production of URLs that become stale over time. diff --git a/docs/topics/testing/advanced.txt b/docs/topics/testing/advanced.txt index 79d3f97f48..72373c6107 100644 --- a/docs/topics/testing/advanced.txt +++ b/docs/topics/testing/advanced.txt @@ -357,7 +357,7 @@ Advanced features of ``TransactionTestCase`` self.assertEqual(lion.pk, 1) Unless you are explicitly testing primary keys sequence numbers, it is - recommended that you do not hard code primary key values in tests. + recommended that you do not hardcode primary key values in tests. Using ``reset_sequences = True`` will slow down the test, since the primary key reset is a relatively expensive database operation. -- cgit v1.3