diff options
Diffstat (limited to 'docs')
| -rw-r--r-- | docs/django-admin.txt | 6 | ||||
| -rw-r--r-- | docs/model-api.txt | 10 |
2 files changed, 8 insertions, 8 deletions
diff --git a/docs/django-admin.txt b/docs/django-admin.txt index 21821ab2e9..e79c105bbd 100644 --- a/docs/django-admin.txt +++ b/docs/django-admin.txt @@ -717,7 +717,7 @@ in Python package syntax, e.g. ``mysite.settings``. If this isn't provided, variable. Note that this option is unnecessary in ``manage.py``, because it uses -``settings.py`` from the current project by default. +``settings.py`` from the current project by default. Extra niceties ============== @@ -765,9 +765,9 @@ a command that can be executed as an action when you run ``manage.py``:: __init__.py explode.py views.py - + In this example, the ``explode`` command will be made available to any project -that includes the ``fancy_blog`` application in ``settings.INSTALLED_APPS``. +that includes the ``blog`` application in ``settings.INSTALLED_APPS``. The ``explode.py`` module has only one requirement -- it must define a class called ``Command`` that extends ``django.core.management.base.BaseCommand``. diff --git a/docs/model-api.txt b/docs/model-api.txt index 3f908ec158..7eb0fdbb28 100644 --- a/docs/model-api.txt +++ b/docs/model-api.txt @@ -384,7 +384,7 @@ The admin represents this as an ``<input type="text">`` (a single-line input). ``IPAddressField`` ~~~~~~~~~~~~~~~~~~ -An IP address, in string format (i.e. "24.124.1.30"). +An IP address, in string format (e.g. "192.0.2.30"). The admin represents this as an ``<input type="text">`` (a single-line input). @@ -952,10 +952,10 @@ the relationship should work. All are optional: ``limit_choices_to`` See the description under ``ForeignKey`` above. ``symmetrical`` Only used in the definition of ManyToManyFields on self. - Consider the following model: + Consider the following model:: - class Person(models.Model): - friends = models.ManyToManyField("self") + class Person(models.Model): + friends = models.ManyToManyField("self") When Django processes this model, it identifies that it has a ``ManyToManyField`` on itself, and as a result, it @@ -1872,7 +1872,7 @@ more simply as:: If you define a ``__unicode__()`` method on your model and not a ``__str__()`` method, Django will automatically provide you with a ``__str__()`` that calls -``__unicode()__`` and then converts the result correctly to a UTF-8 encoded +``__unicode__()`` and then converts the result correctly to a UTF-8 encoded string object. This is recommended development practice: define only ``__unicode__()`` and let Django take care of the conversion to string objects when required. |
