diff options
Diffstat (limited to 'docs/howto')
| -rw-r--r-- | docs/howto/custom-model-fields.txt | 6 | ||||
| -rw-r--r-- | docs/howto/custom-template-tags.txt | 4 | ||||
| -rw-r--r-- | docs/howto/initial-data.txt | 2 | ||||
| -rw-r--r-- | docs/howto/outputting-csv.txt | 2 |
4 files changed, 7 insertions, 7 deletions
diff --git a/docs/howto/custom-model-fields.txt b/docs/howto/custom-model-fields.txt index fefd8740e7..915c4e9c37 100644 --- a/docs/howto/custom-model-fields.txt +++ b/docs/howto/custom-model-fields.txt @@ -432,10 +432,10 @@ that is, when you retrieve data using QuerySet methods like ``get()``, Some database column types accept parameters, such as ``CHAR(25)``, where the parameter ``25`` represents the maximum column length. In cases like these, it's more flexible if the parameter is specified in the model rather than being -hard-coded in the ``db_type()`` method. For example, it wouldn't make much -sense to have a ``CharMaxlength25Field``, shown here:: +hardcoded in the ``db_type()`` method. For example, it wouldn't make much sense +to have a ``CharMaxlength25Field``, shown here:: - # This is a silly example of hard-coded parameters. + # This is a silly example of hardcoded parameters. class CharMaxlength25Field(models.Field): def db_type(self, connection): return "char(25)" diff --git a/docs/howto/custom-template-tags.txt b/docs/howto/custom-template-tags.txt index b5577eef7b..a7f413fca1 100644 --- a/docs/howto/custom-template-tags.txt +++ b/docs/howto/custom-template-tags.txt @@ -904,7 +904,7 @@ Notes: any syntax error. * The ``TemplateSyntaxError`` exceptions use the ``tag_name`` variable. - Don't hard-code the tag's name in your error messages, because that + Don't hardcode the tag's name in your error messages, because that couples the tag's name to your function. ``token.contents.split()[0]`` will ''always'' be the name of your tag -- even when the tag has no arguments. @@ -1223,7 +1223,7 @@ Here's how you'd use this new version of the tag: with context in other blocks. But, there's a problem with ``CurrentTimeNode2``: The variable name -``current_time`` is hard-coded. This means you'll need to make sure your +``current_time`` is hardcoded. This means you'll need to make sure your template doesn't use ``{{ current_time }}`` anywhere else, because the ``{% current_time %}`` will blindly overwrite that variable's value. A cleaner solution is to make the template tag specify the name of the output variable, diff --git a/docs/howto/initial-data.txt b/docs/howto/initial-data.txt index a8c5a57726..d0d94ffd12 100644 --- a/docs/howto/initial-data.txt +++ b/docs/howto/initial-data.txt @@ -2,7 +2,7 @@ How to provide initial data for models ====================================== -It's sometimes useful to prepopulate your database with hard-coded data when +It's sometimes useful to prepopulate your database with hardcoded data when you're first setting up an app. You can provide initial data with migrations or fixtures. diff --git a/docs/howto/outputting-csv.txt b/docs/howto/outputting-csv.txt index 8e4bd8108c..6f2eedf3ba 100644 --- a/docs/howto/outputting-csv.txt +++ b/docs/howto/outputting-csv.txt @@ -121,7 +121,7 @@ Here's an example, which generates the same CSV file as above:: headers={"Content-Disposition": 'attachment; filename="somefilename.csv"'}, ) - # The data is hard-coded here, but you could load it from a database or + # The data is hardcoded here, but you could load it from a database or # some other source. csv_data = ( ("First row", "Foo", "Bar", "Baz"), |
