Created
January 7, 2015 00:05
-
-
Save PirosB3/758feb719b3a2dd933b7 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/docs/ref/models/meta.txt b/docs/ref/models/meta.txt | |
index 6526ca3..dc03b9c 100644 | |
--- a/docs/ref/models/meta.txt | |
+++ b/docs/ref/models/meta.txt | |
@@ -164,15 +164,15 @@ These old APIs can be replicated by either: | |
<model-field-attributes>` that describe (or retrieve, in the case of | |
``_with_model`` variants) the properties of the desired fields. | |
-Assuming you have a model named ``MyModel``, the following substitutions | |
-can be made to convert your code to the new API. | |
- | |
-Although these are being presented as "drop-in" replacements for the old | |
+Although it would be possible to "drop-in" replacements for the old | |
API, a simple drop-in replacement probably won't be the best approach in | |
practice. Taking the time to refactor any field loops to make better use | |
of the new API - and possibly include fields that were previously | |
excluded - will almost certainly result in better code. | |
+Assuming you have a model named ``MyModel``, the following substitutions | |
+can be made to convert your code to the new API: | |
+ | |
* ``MyModel._meta.get_field(name)``:: | |
f = MyModel._meta.get_field(name) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment