From 489d5bae5c5e53891c71796427e205625c8afe74 Mon Sep 17 00:00:00 2001 From: Adrian Holovaty Date: Mon, 24 Apr 2006 00:29:31 +0000 Subject: [PATCH] magic-removal: Removed 'New in Django development version' notes in all docs git-svn-id: http://code.djangoproject.com/svn/django/branches/magic-removal@2744 bcc190cf-cafb-0310-a4f2-bffc1f526a37 --- docs/admin_css.txt | 57 ++++++++------------------- docs/django-admin.txt | 18 ++++----- docs/email.txt | 16 ++++---- docs/generic_views.txt | 81 +++++++++++++++++++-------------------- docs/request_response.txt | 16 +++----- docs/sessions.txt | 2 - docs/settings.txt | 10 ----- docs/templates.txt | 12 ++---- docs/templates_python.txt | 8 ++-- 9 files changed, 84 insertions(+), 136 deletions(-) diff --git a/docs/admin_css.txt b/docs/admin_css.txt index 419e0bcd42..069012a84b 100644 --- a/docs/admin_css.txt +++ b/docs/admin_css.txt @@ -28,11 +28,13 @@ Column Types .. admonition:: Note - In the Django development version, all admin pages (except the dashboard) are fluid-width. All fixed-width classes have been removed. + All admin pages (except the dashboard) are fluid-width. All fixed-width + classes from previous Django versions have been removed. The base template for each admin page has a block that defines the column structure for the page. This sets a class on the page content area -(``div#content``) so everything on the page knows how wide it should be. There are three column types available. +(``div#content``) so everything on the page knows how wide it should be. There +are three column types available. colM This is the default column setting for all pages. The "M" stands for "main". @@ -46,39 +48,12 @@ colMS colSM Same as above, with the sidebar on the left. The source order of the columns doesn't matter. -colM superwide (removed in Django development version) - This is for ridiculously wide pages. Doesn't really work very well for - anything but colM. With superwide, you've got 1000px to work with. Don't - waste them. -flex (removed in Django development version) - This is for liquid-width pages, such as changelists. Currently only works - with single-column pages (does not combine with ``.colMS`` or ``.colSM``). - Form pages should never use ``.flex``. -For instance, you could stick this in a template to make a two-column page with the sidebar on the right:: +For instance, you could stick this in a template to make a two-column page with +the sidebar on the right:: {% block coltype %}colMS{% endblock %} - -Widths -====== - -**Removed in Django development version (see note above).** - -There's a whole mess of classes in the stylesheet for custom pixel widths on -objects. They come in handy for tables and table cells, if you want to avoid -using the ``width`` attribute. Each class sets the width to the number of pixels -in the class, except ``.xfull`` which will always be the width of the column -it's in. (This helps with tables that you want to always fill the horizontal -width, without using ``width="100%"`` which makes IE 5's box model cry.) - -**Note:** Within a ``.flex`` page, the ``.xfull`` class will ``usually`` set -to 100%, but there are exceptions and still some untested cases. - -Available width classes:: - - .x50 .x75 .x100 .x150 .x200 .x250 .x300 .x400 .x500 .xfull - Text Styles =========== @@ -107,17 +82,18 @@ There are also a few styles for styling text. .help This is a custom class for blocks of inline help text explaining the function of form elements. It makes text smaller and gray, and when applied - to ``p`` elements withing ``.form-row`` elements (see Form Styles below), it will - offset the text to align with the form field. Use this for help text, - instead of ``small quiet``. It works on other elements, but try to put the class - on a ``p`` whenever you can. + to ``p`` elements withing ``.form-row`` elements (see Form Styles below), + it will offset the text to align with the form field. Use this for help + text, instead of ``small quiet``. It works on other elements, but try to + put the class on a ``p`` whenever you can. .align-left - It aligns the text left. Only works on block elements containing inline elements. + It aligns the text left. Only works on block elements containing inline + elements. .align-right Are you paying attention? .nowrap - Keeps text and inline objects from wrapping. Comes in handy for table headers you want to stay - on one line. + Keeps text and inline objects from wrapping. Comes in handy for table + headers you want to stay on one line. Floats and Clears ----------------- @@ -173,9 +149,10 @@ Each fieldset can also take extra classes in addition to ``.module`` to apply appropriate formatting to the group of fields. .aligned - this will align the labels and inputs side by side on the same line. + This will align the labels and inputs side by side on the same line. .wide - used in combination with ``.aligned`` to widen the space available for the labels. + Used in combination with ``.aligned`` to widen the space available for the + labels. Form Rows --------- diff --git a/docs/django-admin.txt b/docs/django-admin.txt index f77aebd330..5edf5d5bc1 100644 --- a/docs/django-admin.txt +++ b/docs/django-admin.txt @@ -110,12 +110,12 @@ output: ``'This field type is a guess.'`` next to the field in the generated model. - * **New in Django development version.** If the database column name is a - Python reserved word (such as ``'pass'``, ``'class'`` or ``'for'``), - ``inspectdb`` will append ``'_field'`` to the attribute name. For - example, if a table has a column ``'for'``, the generated model will have - a field ``'for_field'``, with the ``db_column`` attribute set to - ``'for'``. ``inspectdb`` will insert the Python comment + * If the database column name is a Python reserved word (such as + ``'pass'``, ``'class'`` or ``'for'``), ``inspectdb`` will append + ``'_field'`` to the attribute name. For example, if a table has a column + ``'for'``, the generated model will have a field ``'for_field'``, with + the ``db_column`` attribute set to ``'for'``. ``inspectdb`` will insert + the Python comment ``'Field renamed because it was a Python reserved word.'`` next to the field. @@ -180,9 +180,9 @@ shell Starts the Python interactive interpreter. -**New in Django development version:** Uses IPython_, if it's installed. If you -have IPython installed and want to force use of the "plain" Python interpreter, -use the ``--plain`` option, like so:: +Django will use IPython_, if it's installed. If you have IPython installed and +want to force use of the "plain" Python interpreter, use the ``--plain`` +option, like so:: django-admin.py shell --plain diff --git a/docs/email.txt b/docs/email.txt index ae55a51a14..678ab2fa9c 100644 --- a/docs/email.txt +++ b/docs/email.txt @@ -42,13 +42,12 @@ are required. * ``fail_silently``: A boolean. If it's ``False``, ``send_mail`` will raise an ``smtplib.SMTPException``. See the `smtplib docs`_ for a list of possible exceptions, all of which are subclasses of ``SMTPException``. - * ``auth_user``: **New in Django development version.** The optional - username to use to authenticate to the SMTP server. If this isn't - provided, Django will use the value of the ``EMAIL_HOST_USER`` setting. - * ``auth_password``: **New in Django development version.** The optional - password to use to authenticate to the SMTP server. If this isn't - provided, Django will use the value of the ``EMAIL_HOST_PASSWORD`` - setting. + * ``auth_user``: The optional username to use to authenticate to the SMTP + server. If this isn't provided, Django will use the value of the + ``EMAIL_HOST_USER`` setting. + * ``auth_password``: The optional password to use to authenticate to the + SMTP server. If this isn't provided, Django will use the value of the + ``EMAIL_HOST_PASSWORD`` setting. .. _smtplib docs: http://www.python.org/doc/current/lib/module-smtplib.html @@ -66,8 +65,7 @@ Here's the definition:: (subject, message, from_email, recipient_list) ``fail_silently``, ``auth_user`` and ``auth_password`` have the same functions -as in ``send_mail()``. Note that ``auth_user`` and ``auth_password`` are only -available in the Django development version. +as in ``send_mail()``. Each separate element of ``datatuple`` results in a separate e-mail message. As in ``send_mail()``, recipients in the same ``recipient_list`` will all see diff --git a/docs/generic_views.txt b/docs/generic_views.txt index baddd8036d..5962cf0a8c 100644 --- a/docs/generic_views.txt +++ b/docs/generic_views.txt @@ -189,9 +189,8 @@ The date-based generic functions are: Takes an optional ``allow_empty`` parameter, as ``archive_index``. - **New in Django development version:** Takes an optional - ``template_object_name`` parameter, which designates the name of the - template variable to use. Default is ``'object'``. + Takes an optional ``template_object_name`` parameter, which designates the + name of the template variable to use. Default is ``'object'``. Uses the template ``/_archive_month.html`` by default. @@ -200,18 +199,17 @@ The date-based generic functions are: ``month`` The given month (a datetime.date object) ``next_month`` - **New in Django development version.** The first day of the next - month, or None if the next month is in the future (a datetime.date - object) + The first day of the next month, or None if the next month is in + the future (a datetime.date object) ``previous_month`` - **New in Django development version.** The first day of the - previous month (a datetime.date object) + The first day of the previous month (a datetime.date object) ``object_list`` List of objects published in the given month. - In the Django development version, you can change this variable - name from ``object_list`` by using the ``template_object_name`` - parameter. (See above.) For example, if ``template_object_name`` is - ``foo``, the variable will be ``foo_list``. + + You can change this variable name from ``object_list`` by using the + ``template_object_name`` parameter. (See above.) For example, if + ``template_object_name`` is ``foo``, the variable will be + ``foo_list``. ``archive_week`` Weekly archive. Requires that ``year`` and ``week`` arguments be given. The @@ -242,9 +240,8 @@ The date-based generic functions are: also pass ``day_format``, which defaults to ``"%d"`` (day of the month as a decimal number, 1-31). - **New in Django development version:** Takes an optional - ``template_object_name`` parameter, which designates the name of the - template variable to use. Default is ``'object'``. + Takes an optional ``template_object_name`` parameter, which designates the + name of the template variable to use. Default is ``'object'``. Uses the template ``/_archive_day.html`` by default. @@ -252,10 +249,11 @@ The date-based generic functions are: ``object_list`` List of objects published on the given day. - In the Django development version, you can change this variable - name from ``object_list`` by using the ``template_object_name`` - parameter. (See above.) For example, if ``template_object_name`` is - ``foo``, the variable will be ``foo_list``. + + You can change this variable name from ``object_list`` by using the + ``template_object_name`` parameter. (See above.) For example, if + ``template_object_name`` is ``foo``, the variable will be + ``foo_list``. ``day`` The given day (a datetime.datetime object) ``previous_day`` @@ -287,9 +285,8 @@ The date-based generic functions are: As in ``archive_day``, ``object_detail`` takes optional ``month_format`` and ``day_format`` parameters. - **New in Django development version:** Takes an optional - ``template_object_name`` parameter, which designates the name of the - template variable to use. Default is ``'object'``. + Takes an optional ``template_object_name`` parameter, which designates the + name of the template variable to use. Default is ``'object'``. .. _strftime docs: http://www.python.org/doc/current/lib/module-time.html#l2h-1941 @@ -323,9 +320,8 @@ Individual views are: the view will raise a 404 instead of displaying an empty index page. ``False`` is default. - ``template_object_name`` **New in Django development version.** Designates - the name of the object template variable. Default - is ``'object'``. + ``template_object_name`` Designates the name of the object template + variable. Default is ``'object'``. ======================== ================================================= Uses the template ``/.html`` by default. @@ -333,8 +329,9 @@ Individual views are: Has the following template context: ``object_list`` - List of objects. In the Django development version, you can change - this variable name from ``object_list`` by using the + List of objects. + + You can change this variable name from ``object_list`` by using the ``template_object_name`` parameter. (See above.) For example, if ``template_object_name`` is ``foo``, the variable will be ``foo_list``. @@ -407,9 +404,8 @@ The create/update/delete views are: ``list_detail.object_detail`` does (see above), and the same ``post_save_redirect`` as ``create_object`` does. - **New in Django development version:** Takes an optional - ``template_object_name`` parameter, which designates the name of the - template variable to use. Default is ``'object'``. + Takes an optional ``template_object_name`` parameter, which designates the + name of the template variable to use. Default is ``'object'``. Uses the template ``/_form.html`` by default. @@ -419,10 +415,11 @@ The create/update/delete views are: The form wrapper for the object object The original object being edited. - In the Django development version, you can change this variable - name from ``object`` by using the ``template_object_name`` - parameter. (See above.) For example, if ``template_object_name`` is - ``foo``, the variable will be ``foo`` instead of ``object``. + + You can change this variable name from ``object`` by using the + ``template_object_name`` parameter. (See above.) For example, if + ``template_object_name`` is ``foo``, the variable will be ``foo`` + instead of ``object``. ``delete_object`` Delete an existing object. The given object will only actually be deleted @@ -437,15 +434,15 @@ The create/update/delete views are: ``/_confirm_delete`` by default. It uses no template if POSTed -- it simply deletes the object and redirects. - **New in Django development version:** Takes an optional - ``template_object_name`` parameter, which designates the name of the - template variable to use. Default is ``'object'``. + Takes an optional ``template_object_name`` parameter, which designates the + name of the template variable to use. Default is ``'object'``. Has the following template context: object - The object about to be deleted - In the Django development version, you can change this variable - name from ``object`` by using the ``template_object_name`` - parameter. (See above.) For example, if ``template_object_name`` is - ``foo``, the variable will be ``foo`` instead of ``object``. + The object about to be deleted. + + You can change this variable name from ``object`` by using the + ``template_object_name`` parameter. (See above.) For example, if + ``template_object_name`` is ``foo``, the variable will be ``foo`` + instead of ``object``. diff --git a/docs/request_response.txt b/docs/request_response.txt index 03f9e90580..696f186525 100644 --- a/docs/request_response.txt +++ b/docs/request_response.txt @@ -304,9 +304,9 @@ Methods Instantiates an ``HttpResponse`` object with the given page content (a string) and MIME type. The ``DEFAULT_MIME_TYPE`` is ``"text/html"``. - **New in Django development version:** ``content`` can be an iterator - instead of a string. This iterator should return strings, and those strings - will be joined together to form the content of the response. + ``content`` can be an iterator or a string. If it's an iterator, it should + return strings, and those strings will be joined together to form the + content of the response. ``__setitem__(header, value)`` Sets the given header name to the given value. Both ``header`` and @@ -343,14 +343,10 @@ Methods Deletes the cookie with the given key. Fails silently if the key doesn't exist. -``get_content_as_string(encoding)`` - Returns the content as a Python string, encoding it from a Unicode object - if necessary. **Removed in Django development version.** - ``content`` - **New in Django development version.** Returns the content as a Python - string, encoding it from a Unicode object if necessary. Note this is a - property, not a method, so use ``r.content`` instead of ``r.content()``. + Returns the content as a Python string, encoding it from a Unicode object + if necessary. Note this is a property, not a method, so use ``r.content`` + instead of ``r.content()``. ``write(content)``, ``flush()`` and ``tell()`` These methods make an ``HttpResponse`` instance a file-like object. diff --git a/docs/sessions.txt b/docs/sessions.txt index b6b467fd34..97544816a2 100644 --- a/docs/sessions.txt +++ b/docs/sessions.txt @@ -46,10 +46,8 @@ It implements the following standard dictionary methods: Example: ``fav_color = request.session.get('fav_color', 'red')`` * ``keys()`` - **New in Django development version.** * ``items()`` - **New in Django development version.** It also has these three methods: diff --git a/docs/settings.txt b/docs/settings.txt index 803280da08..bd93a4791b 100644 --- a/docs/settings.txt +++ b/docs/settings.txt @@ -363,8 +363,6 @@ EMAIL_HOST_PASSWORD Default: ``''`` (Empty string) -**New in Django development version.** - Username to use for the SMTP server defined in ``EMAIL_HOST``. If empty, Django won't attempt authentication. @@ -375,8 +373,6 @@ EMAIL_HOST_USER Default: ``''`` (Empty string) -**New in Django development version.** - Username to use for the SMTP server defined in ``EMAIL_HOST``. If empty, Django won't attempt authentication. @@ -387,8 +383,6 @@ EMAIL_PORT Default: ``25`` -**New in Django development version.** - Port to use for the SMTP server defined in ``EMAIL_HOST``. EMAIL_SUBJECT_PREFIX @@ -405,8 +399,6 @@ ENABLE_PSYCO Default: ``False`` -**New in Django development version.** - Whether to enable Psyco, which optimizes Python code. Requires Psyco_. .. _Psyco: http://psyco.sourceforge.net/ @@ -676,8 +668,6 @@ TEMPLATE_STRING_IF_INVALID Default: ``''`` (Empty string) -**New in Django development version.** - Output, as a string, that the template system should use for invalid (e.g. misspelled) variables. See `How invalid variables are handled`_. diff --git a/docs/templates.txt b/docs/templates.txt index 88f14dd3b9..2ca8e05a27 100644 --- a/docs/templates.txt +++ b/docs/templates.txt @@ -70,9 +70,7 @@ Use a dot (``.``) to access attributes of a variable. In the above example, ``{{ section.title }}`` will be replaced with the ``title`` attribute of the ``section`` object. -In Django 0.91, if you use a variable that doesn't exist, it will be silently -ignored; the variable will be replaced by nothingness. In the Django -development version, if a variable doesn't exist, the template system inserts +If you use a variable that doesn't exist, the template system will insert the value of the ``TEMPLATE_STRING_IF_INVALID`` setting, which is set to ``''`` (the empty string) by default. @@ -247,10 +245,8 @@ Because Django can be used to develop any sort of site, the tags, filters and variables available are different depending on the application. To make it easy to figure out what's available in a given site, the admin interface has a complete reference of all the template goodies available to that site. To get -that reference, go to your Django admin interface and append ``'doc'`` onto the -admin URL. Example: ``http://127.0.0.1/admin/doc/``. In the Django development -version, you'll see a "Documentation" link in the upper right of every -admin-site page. +that reference, go to your Django admin interface and click the "Documentation" +link in the upper right of any page. The reference is integrated into the administration interface for your site(s) and is divided into 4 sections: tags, filters, models, and views. @@ -693,8 +689,6 @@ i.e.:: spaceless ~~~~~~~~~ -**New in Django development version.** - Normalizes whitespace between HTML tags to a single space. This includes tab characters and newlines. diff --git a/docs/templates_python.txt b/docs/templates_python.txt index c40d4e9be2..d937ea2aad 100644 --- a/docs/templates_python.txt +++ b/docs/templates_python.txt @@ -209,9 +209,9 @@ This applies to any level of lookup:: >>> t.render(c) "My name is Stan ." -In the Django development version, if a variable doesn't exist, the template -system inserts the value of the ``TEMPLATE_STRING_IF_INVALID`` setting, which -is set to ``''`` (the empty string) by default. +If a variable doesn't exist, the template system inserts the value of the +``TEMPLATE_STRING_IF_INVALID`` setting, which is set to ``''`` (the empty +string) by default. Playing with Context objects ---------------------------- @@ -352,8 +352,6 @@ See the `internationalization docs`_ for more. django.core.context_processors.request ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -**New in Django development version** - If ``TEMPLATE_CONTEXT_PROCESSORS`` contains this processor, every ``DjangoContext`` will contain a variable ``request``, which is the current `HttpRequest object`_. Note that this processor is not enabled by default;