Django Book 翻译
菜单>:
TOC
返回
原文:
Make sure any model you define has a ``__str__()`` method not only for your own convenience when using the interactive interpreter, but also because Django uses the output of ``__str__()`` in several places when it needs to display objects.
翻译:
请确保你的每一个模型里都包含 ``__str__()`` 方法,这不只是为了交互时方便,也是因为 Django会在其他一些地方用 ``__str__()`` 来显示对象。
备注:
译者: