Django

Code

Changeset 7122

Show
Ignore:
Timestamp:
02/15/08 23:15:09 (7 months ago)
Author:
adrian
Message:

Made a bunch of small doc rewordings from changes over the past couple of weeks

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • django/trunk/django/utils/datastructures.py

    r7062 r7122  
    44    up values in more than one dictionary, passed in the constructor. 
    55 
    6     If a key appears in more than one of the passed in dictionaries, only the 
     6    If a key appears in more than one of the given dictionaries, only the 
    77    first occurrence will be used. 
    88    """ 
  • django/trunk/docs/modelforms.txt

    r7115 r7122  
    324324Form inheritance 
    325325---------------- 
    326 As with the basic forms, you can extend and reuse ``ModelForms`` by inheriting 
    327 them. Normally, this will be useful if you need to declare some extra fields 
    328 or extra methods on a parent class for use in a number of forms derived from 
    329 models. For example, using the previous ``ArticleForm`` class:: 
     326 
     327As with basic forms, you can extend and reuse ``ModelForms`` by inheriting 
     328them. This is useful if you need to declare extra fields or extra methods on a 
     329parent class for use in a number of forms derived from models. For example, 
     330using the previous ``ArticleForm`` class:: 
    330331 
    331332    >>> class EnhancedArticleForm(ArticleForm): 
     
    333334    ...         ... 
    334335 
    335 This creates a form that behaves identically to ``ArticleForm``, except there 
    336 is some extra validation and cleaning for the ``pub_date`` field. 
     336This creates a form that behaves identically to ``ArticleForm``, except there's 
     337some extra validation and cleaning for the ``pub_date`` field. 
    337338 
    338339You can also subclass the parent's ``Meta`` inner class if you want to change 
     
    343344    ...         exclude = ['body'] 
    344345 
    345 This adds in the extra method from the ``EnhancedArticleForm`` and modifies 
     346This adds the extra method from the ``EnhancedArticleForm`` and modifies 
    346347the original ``ArticleForm.Meta`` to remove one field. 
    347348 
    348 There are a couple of things to note, however. Most of these won't normally be 
    349 of concern unless you are trying to do something tricky with subclassing. 
     349There are a couple of things to note, however. 
    350350 
    351351 * Normal Python name resolution rules apply. If you have multiple base 
    352352   classes that declare a ``Meta`` inner class, only the first one will be 
    353    used. This means the child's ``Meta``, if it exists, otherwise the 
     353   used. This means the child's ``Meta``, if it exists, otherwise the 
    354354   ``Meta`` of the first parent, etc. 
    355355 
    356  * For technical reasons, you cannot have a subclass that is inherited from 
    357    both a ``ModelForm`` and a ``Form`` simultaneously. 
    358  
     356 * For technical reasons, a subclass cannot inherit from both a ``ModelForm`` 
     357   and a ``Form`` simultaneously. 
     358 
     359Chances are these notes won't affect you unless you're trying to do something 
     360tricky with subclassing. 
  • django/trunk/docs/request_response.txt

    r7081 r7122  
    577577 
    578578    * The 404 view is passed a ``RequestContext`` and will have access to 
    579       variables supplied by your ``TEMPLATE_CONTEXT_PROCESSORS`` (e.g. 
     579      variables supplied by your ``TEMPLATE_CONTEXT_PROCESSORS`` setting (e.g., 
    580580      ``MEDIA_URL``). 
    581581 
  • django/trunk/docs/shortcuts.txt

    r7053 r7122  
    3131    The context instance to render the template with. By default, the template 
    3232    will be rendered with a ``Context`` instance (filled with values from 
    33     ``dictionary``). If you need to use `context processors`_, you will want to 
    34     render the template with a ``RequestContext`` instance instead. Your code 
    35     might look something like this:: 
     33    ``dictionary``). If you need to use `context processors`_, render the 
     34    template with a ``RequestContext`` instance instead. Your code might look 
     35    something like this:: 
    3636 
    3737        return render_to_response('my_template.html', 
  • django/trunk/docs/templates.txt

    r7007 r7122  
    14071407~~~~ 
    14081408 
     1409**New in Django development version.** 
     1410 
    14091411Returns the last item in a list. 
    14101412 
  • django/trunk/docs/url_dispatch.txt

    r7110 r7122  
    192192 
    193193.. note:: 
    194     Since `patterns()` is a function call, it accepts a maximum of 255 
     194    Because `patterns()` is a function call, it accepts a maximum of 255 
    195195    arguments (URL patterns, in this case). This is a limit for all Python 
    196     function calls. This will rarely be  problem in practice, since you'll 
     196    function calls. This is rarely a problem in practice, because you'll 
    197197    typically structure your URL patterns modularly by using `include()` 
    198198    sections. However, on the off-chance you do hit the 255-argument limit, 
    199     realise that `patterns()` returns a Python list, so you can split up the 
     199    realize that `patterns()` returns a Python list, so you can split up the 
    200200    construction of the list. 
    201201 
     
    210210 
    211211    Python lists have unlimited size, so there's no limit to how many URL 
    212     patterns you can construct; merely that you may only create 254 at a time 
    213     (the 255-th argument is the initial prefix argument). 
     212    patterns you can construct. The only limit is that you can only create 254 
     213    at a time (the 255th argument is the initial prefix argument). 
    214214 
    215215url