Changeset 7119
- Timestamp:
- 02/15/08 05:38:53 (5 months ago)
- Files:
-
- django/trunk/docs/django-admin.txt (modified) (2 diffs)
- django/trunk/docs/model-api.txt (modified) (3 diffs)
- django/trunk/tests/modeltests/ordering/models.py (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
django/trunk/docs/django-admin.txt
r6983 r7119 718 718 719 719 Note that this option is unnecessary in ``manage.py``, because it uses 720 ``settings.py`` from the current project by default. 720 ``settings.py`` from the current project by default. 721 721 722 722 Extra niceties … … 766 766 explode.py 767 767 views.py 768 768 769 769 In this example, the ``explode`` command will be made available to any project 770 that includes the `` fancy_blog`` application in ``settings.INSTALLED_APPS``.770 that includes the ``blog`` application in ``settings.INSTALLED_APPS``. 771 771 772 772 The ``explode.py`` module has only one requirement -- it must define a class django/trunk/docs/model-api.txt
r6879 r7119 385 385 ~~~~~~~~~~~~~~~~~~ 386 386 387 An IP address, in string format ( i.e. "24.124.1.30").387 An IP address, in string format (e.g. "192.0.2.30"). 388 388 389 389 The admin represents this as an ``<input type="text">`` (a single-line input). … … 953 953 954 954 ``symmetrical`` Only used in the definition of ManyToManyFields on self. 955 Consider the following model: 956 957 class Person(models.Model):958 friends = models.ManyToManyField("self")955 Consider the following model:: 956 957 class Person(models.Model): 958 friends = models.ManyToManyField("self") 959 959 960 960 When Django processes this model, it identifies that it has … … 1873 1873 If you define a ``__unicode__()`` method on your model and not a ``__str__()`` 1874 1874 method, Django will automatically provide you with a ``__str__()`` that calls 1875 ``__unicode ()__`` and then converts the result correctly to a UTF-8 encoded1875 ``__unicode__()`` and then converts the result correctly to a UTF-8 encoded 1876 1876 string object. This is recommended development practice: define only 1877 1877 ``__unicode__()`` and let Django take care of the conversion to string objects django/trunk/tests/modeltests/ordering/models.py
r5876 r7119 3 3 4 4 Specify default ordering for a model using the ``ordering`` attribute, which 5 should be a list or tuple of field names. This tells Django how to order the6 results of ``get_list()`` and other similar functions.5 should be a list or tuple of field names. This tells Django how to order 6 queryset results. 7 7 8 8 If a field name in ``ordering`` starts with a hyphen, that field will be
