Changeset 2744
- Timestamp:
- 04/23/06 19:29:31 (2 years ago)
- Files:
-
- django/branches/magic-removal/docs/admin_css.txt (modified) (4 diffs)
- django/branches/magic-removal/docs/django-admin.txt (modified) (2 diffs)
- django/branches/magic-removal/docs/email.txt (modified) (2 diffs)
- django/branches/magic-removal/docs/generic_views.txt (modified) (10 diffs)
- django/branches/magic-removal/docs/request_response.txt (modified) (2 diffs)
- django/branches/magic-removal/docs/sessions.txt (modified) (1 diff)
- django/branches/magic-removal/docs/settings.txt (modified) (5 diffs)
- django/branches/magic-removal/docs/templates_python.txt (modified) (2 diffs)
- django/branches/magic-removal/docs/templates.txt (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
django/branches/magic-removal/docs/admin_css.txt
r2273 r2744 29 29 .. admonition:: Note 30 30 31 In the Django development version, all admin pages (except the dashboard) are fluid-width. All fixed-width classes have been removed. 31 All admin pages (except the dashboard) are fluid-width. All fixed-width 32 classes from previous Django versions have been removed. 32 33 33 34 The base template for each admin page has a block that defines the column 34 35 structure for the page. This sets a class on the page content area 35 (``div#content``) so everything on the page knows how wide it should be. There are three column types available. 36 (``div#content``) so everything on the page knows how wide it should be. There 37 are three column types available. 36 38 37 39 colM … … 47 49 Same as above, with the sidebar on the left. The source order of the columns 48 50 doesn't matter. 49 colM superwide (removed in Django development version)50 This is for ridiculously wide pages. Doesn't really work very well for51 anything but colM. With superwide, you've got 1000px to work with. Don't52 waste them.53 flex (removed in Django development version)54 This is for liquid-width pages, such as changelists. Currently only works55 with single-column pages (does not combine with ``.colMS`` or ``.colSM``).56 Form pages should never use ``.flex``.57 51 58 For instance, you could stick this in a template to make a two-column page with the sidebar on the right:: 52 For instance, you could stick this in a template to make a two-column page with 53 the sidebar on the right:: 59 54 60 55 {% block coltype %}colMS{% endblock %} 61 62 63 Widths64 ======65 66 **Removed in Django development version (see note above).**67 68 There's a whole mess of classes in the stylesheet for custom pixel widths on69 objects. They come in handy for tables and table cells, if you want to avoid70 using the ``width`` attribute. Each class sets the width to the number of pixels71 in the class, except ``.xfull`` which will always be the width of the column72 it's in. (This helps with tables that you want to always fill the horizontal73 width, without using ``width="100%"`` which makes IE 5's box model cry.)74 75 **Note:** Within a ``.flex`` page, the ``.xfull`` class will ``usually`` set76 to 100%, but there are exceptions and still some untested cases.77 78 Available width classes::79 80 .x50 .x75 .x100 .x150 .x200 .x250 .x300 .x400 .x500 .xfull81 56 82 57 Text Styles … … 108 83 This is a custom class for blocks of inline help text explaining the 109 84 function of form elements. It makes text smaller and gray, and when applied 110 to ``p`` elements withing ``.form-row`` elements (see Form Styles below), it will111 offset the text to align with the form field. Use this for help text,112 instead of ``small quiet``. It works on other elements, but try to put the class113 on a ``p`` whenever you can.85 to ``p`` elements withing ``.form-row`` elements (see Form Styles below), 86 it will offset the text to align with the form field. Use this for help 87 text, instead of ``small quiet``. It works on other elements, but try to 88 put the class on a ``p`` whenever you can. 114 89 .align-left 115 It aligns the text left. Only works on block elements containing inline elements. 90 It aligns the text left. Only works on block elements containing inline 91 elements. 116 92 .align-right 117 93 Are you paying attention? 118 94 .nowrap 119 Keeps text and inline objects from wrapping. Comes in handy for table headers you want to stay120 on one line.95 Keeps text and inline objects from wrapping. Comes in handy for table 96 headers you want to stay on one line. 121 97 122 98 Floats and Clears … … 174 150 175 151 .aligned 176 this will align the labels and inputs side by side on the same line.152 This will align the labels and inputs side by side on the same line. 177 153 .wide 178 used in combination with ``.aligned`` to widen the space available for the labels. 154 Used in combination with ``.aligned`` to widen the space available for the 155 labels. 179 156 180 157 Form Rows django/branches/magic-removal/docs/django-admin.txt
r2711 r2744 111 111 model. 112 112 113 * **New in Django development version.** If the database column name is a114 Python reserved word (such as ``'pass'``, ``'class'`` or ``'for'``),115 `` inspectdb`` will append ``'_field'`` to the attribute name. For116 example, if a table has a column ``'for'``, the generated model will have117 a field ``'for_field'``, with the ``db_column`` attribute set to118 ``'for'``. ``inspectdb`` will insertthe Python comment113 * If the database column name is a Python reserved word (such as 114 ``'pass'``, ``'class'`` or ``'for'``), ``inspectdb`` will append 115 ``'_field'`` to the attribute name. For example, if a table has a column 116 ``'for'``, the generated model will have a field ``'for_field'``, with 117 the ``db_column`` attribute set to ``'for'``. ``inspectdb`` will insert 118 the Python comment 119 119 ``'Field renamed because it was a Python reserved word.'`` next to the 120 120 field. … … 181 181 Starts the Python interactive interpreter. 182 182 183 **New in Django development version:** Uses IPython_, if it's installed. If you 184 have IPython installed and want to force use of the "plain" Python interpreter, 185 use the ``--plain``option, like so::183 Django will use IPython_, if it's installed. If you have IPython installed and 184 want to force use of the "plain" Python interpreter, use the ``--plain`` 185 option, like so:: 186 186 187 187 django-admin.py shell --plain django/branches/magic-removal/docs/email.txt
r2575 r2744 43 43 an ``smtplib.SMTPException``. See the `smtplib docs`_ for a list of 44 44 possible exceptions, all of which are subclasses of ``SMTPException``. 45 * ``auth_user``: **New in Django development version.** The optional 46 username to use to authenticate to the SMTP server. If this isn't 47 provided, Django will use the value of the ``EMAIL_HOST_USER`` setting. 48 * ``auth_password``: **New in Django development version.** The optional 49 password to use to authenticate to the SMTP server. If this isn't 50 provided, Django will use the value of the ``EMAIL_HOST_PASSWORD`` 51 setting. 45 * ``auth_user``: The optional username to use to authenticate to the SMTP 46 server. If this isn't provided, Django will use the value of the 47 ``EMAIL_HOST_USER`` setting. 48 * ``auth_password``: The optional password to use to authenticate to the 49 SMTP server. If this isn't provided, Django will use the value of the 50 ``EMAIL_HOST_PASSWORD`` setting. 52 51 53 52 .. _smtplib docs: http://www.python.org/doc/current/lib/module-smtplib.html … … 67 66 68 67 ``fail_silently``, ``auth_user`` and ``auth_password`` have the same functions 69 as in ``send_mail()``. Note that ``auth_user`` and ``auth_password`` are only 70 available in the Django development version. 68 as in ``send_mail()``. 71 69 72 70 Each separate element of ``datatuple`` results in a separate e-mail message. django/branches/magic-removal/docs/generic_views.txt
r2743 r2744 190 190 Takes an optional ``allow_empty`` parameter, as ``archive_index``. 191 191 192 **New in Django development version:** Takes an optional 193 ``template_object_name`` parameter, which designates the name of the 194 template variable to use. Default is ``'object'``. 192 Takes an optional ``template_object_name`` parameter, which designates the 193 name of the template variable to use. Default is ``'object'``. 195 194 196 195 Uses the template ``<app_label>/<model_name>_archive_month.html`` by default. … … 201 200 The given month (a datetime.date object) 202 201 ``next_month`` 203 **New in Django development version.** The first day of the next 204 month, or None if the next month is in the future (a datetime.date 205 object) 202 The first day of the next month, or None if the next month is in 203 the future (a datetime.date object) 206 204 ``previous_month`` 207 **New in Django development version.** The first day of the 208 previous month (a datetime.date object) 205 The first day of the previous month (a datetime.date object) 209 206 ``object_list`` 210 207 List of objects published in the given month. 211 In the Django development version, you can change this variable 212 name from ``object_list`` by using the ``template_object_name`` 213 parameter. (See above.) For example, if ``template_object_name`` is 214 ``foo``, the variable will be ``foo_list``. 208 209 You can change this variable name from ``object_list`` by using the 210 ``template_object_name`` parameter. (See above.) For example, if 211 ``template_object_name`` is ``foo``, the variable will be 212 ``foo_list``. 215 213 216 214 ``archive_week`` … … 243 241 decimal number, 1-31). 244 242 245 **New in Django development version:** Takes an optional 246 ``template_object_name`` parameter, which designates the name of the 247 template variable to use. Default is ``'object'``. 243 Takes an optional ``template_object_name`` parameter, which designates the 244 name of the template variable to use. Default is ``'object'``. 248 245 249 246 Uses the template ``<app_label>/<model_name>_archive_day.html`` by default. … … 253 250 ``object_list`` 254 251 List of objects published on the given day. 255 In the Django development version, you can change this variable 256 name from ``object_list`` by using the ``template_object_name`` 257 parameter. (See above.) For example, if ``template_object_name`` is 258 ``foo``, the variable will be ``foo_list``. 252 253 You can change this variable name from ``object_list`` by using the 254 ``template_object_name`` parameter. (See above.) For example, if 255 ``template_object_name`` is ``foo``, the variable will be 256 ``foo_list``. 259 257 ``day`` 260 258 The given day (a datetime.datetime object) … … 288 286 and ``day_format`` parameters. 289 287 290 **New in Django development version:** Takes an optional 291 ``template_object_name`` parameter, which designates the name of the 292 template variable to use. Default is ``'object'``. 288 Takes an optional ``template_object_name`` parameter, which designates the 289 name of the template variable to use. Default is ``'object'``. 293 290 294 291 .. _strftime docs: http://www.python.org/doc/current/lib/module-time.html#l2h-1941 … … 324 321 an empty index page. ``False`` is default. 325 322 326 ``template_object_name`` **New in Django development version.** Designates 327 the name of the object template variable. Default 328 is ``'object'``. 323 ``template_object_name`` Designates the name of the object template 324 variable. Default is ``'object'``. 329 325 ======================== ================================================= 330 326 … … 334 330 335 331 ``object_list`` 336 List of objects. In the Django development version, you can change 337 this variable name from ``object_list`` by using the 332 List of objects. 333 334 You can change this variable name from ``object_list`` by using the 338 335 ``template_object_name`` parameter. (See above.) For example, if 339 336 ``template_object_name`` is ``foo``, the variable will be … … 408 405 ``post_save_redirect`` as ``create_object`` does. 409 406 410 **New in Django development version:** Takes an optional 411 ``template_object_name`` parameter, which designates the name of the 412 template variable to use. Default is ``'object'``. 407 Takes an optional ``template_object_name`` parameter, which designates the 408 name of the template variable to use. Default is ``'object'``. 413 409 414 410 Uses the template ``<app_label>/<model_name>_form.html`` by default. … … 420 416 object 421 417 The original object being edited. 422 In the Django development version, you can change this variable 423 name from ``object`` by using the ``template_object_name`` 424 parameter. (See above.) For example, if ``template_object_name`` is 425 ``foo``, the variable will be ``foo`` instead of ``object``. 418 419 You can change this variable name from ``object`` by using the 420 ``template_object_name`` parameter. (See above.) For example, if 421 ``template_object_name`` is ``foo``, the variable will be ``foo`` 422 instead of ``object``. 426 423 427 424 ``delete_object`` … … 438 435 if POSTed -- it simply deletes the object and redirects. 439 436 440 **New in Django development version:** Takes an optional 441 ``template_object_name`` parameter, which designates the name of the 442 template variable to use. Default is ``'object'``. 437 Takes an optional ``template_object_name`` parameter, which designates the 438 name of the template variable to use. Default is ``'object'``. 443 439 444 440 Has the following template context: 445 441 446 442 object 447 The object about to be deleted 448 In the Django development version, you can change this variable 449 name from ``object`` by using the ``template_object_name`` 450 parameter. (See above.) For example, if ``template_object_name`` is 451 ``foo``, the variable will be ``foo`` instead of ``object``. 443 The object about to be deleted. 444 445 You can change this variable name from ``object`` by using the 446 ``template_object_name`` parameter. (See above.) For example, if 447 ``template_object_name`` is ``foo``, the variable will be ``foo`` 448 instead of ``object``. django/branches/magic-removal/docs/request_response.txt
r2641 r2744 305 305 string) and MIME type. The ``DEFAULT_MIME_TYPE`` is ``"text/html"``. 306 306 307 **New in Django development version:** ``content`` can be an iterator308 instead of a string. This iterator should return strings, and those strings309 will be joined together to form thecontent of the response.307 ``content`` can be an iterator or a string. If it's an iterator, it should 308 return strings, and those strings will be joined together to form the 309 content of the response. 310 310 311 311 ``__setitem__(header, value)`` … … 344 344 exist. 345 345 346 `` get_content_as_string(encoding)``346 ``content`` 347 347 Returns the content as a Python string, encoding it from a Unicode object 348 if necessary. **Removed in Django development version.** 349 350 ``content`` 351 **New in Django development version.** Returns the content as a Python 352 string, encoding it from a Unicode object if necessary. Note this is a 353 property, not a method, so use ``r.content`` instead of ``r.content()``. 348 if necessary. Note this is a property, not a method, so use ``r.content`` 349 instead of ``r.content()``. 354 350 355 351 ``write(content)``, ``flush()`` and ``tell()`` django/branches/magic-removal/docs/sessions.txt
r2721 r2744 47 47 48 48 * ``keys()`` 49 **New in Django development version.**50 49 51 50 * ``items()`` 52 **New in Django development version.**53 51 54 52 It also has these three methods: django/branches/magic-removal/docs/settings.txt
r2739 r2744 364 364 Default: ``''`` (Empty string) 365 365 366 **New in Django development version.**367 368 366 Username to use for the SMTP server defined in ``EMAIL_HOST``. If empty, 369 367 Django won't attempt authentication. … … 376 374 Default: ``''`` (Empty string) 377 375 378 **New in Django development version.**379 380 376 Username to use for the SMTP server defined in ``EMAIL_HOST``. If empty, 381 377 Django won't attempt authentication. … … 387 383 388 384 Default: ``25`` 389 390 **New in Django development version.**391 385 392 386 Port to use for the SMTP server defined in ``EMAIL_HOST``. … … 405 399 406 400 Default: ``False`` 407 408 **New in Django development version.**409 401 410 402 Whether to enable Psyco, which optimizes Python code. Requires Psyco_. … … 677 669 Default: ``''`` (Empty string) 678 670 679 **New in Django development version.**680 681 671 Output, as a string, that the template system should use for invalid (e.g. 682 672 misspelled) variables. See `How invalid variables are handled`_. django/branches/magic-removal/docs/templates_python.txt
r2700 r2744 210 210 "My name is Stan ." 211 211 212 I n the Django development version, if a variable doesn't exist, the template213 system inserts the value of the ``TEMPLATE_STRING_IF_INVALID`` setting, which 214 is set to ``''`` (the emptystring) by default.212 If a variable doesn't exist, the template system inserts the value of the 213 ``TEMPLATE_STRING_IF_INVALID`` setting, which is set to ``''`` (the empty 214 string) by default. 215 215 216 216 Playing with Context objects … … 353 353 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 354 354 355 **New in Django development version**356 357 355 If ``TEMPLATE_CONTEXT_PROCESSORS`` contains this processor, every 358 356 ``DjangoContext`` will contain a variable ``request``, which is the current django/branches/magic-removal/docs/templates.txt
r2738 r2744 71 71 ``title`` attribute of the ``section`` object. 72 72 73 In Django 0.91, if you use a variable that doesn't exist, it will be silently 74 ignored; the variable will be replaced by nothingness. In the Django 75 development version, if a variable doesn't exist, the template system inserts 73 If you use a variable that doesn't exist, the template system will insert 76 74 the value of the ``TEMPLATE_STRING_IF_INVALID`` setting, which is set to ``''`` 77 75 (the empty string) by default. … … 248 246 easy to figure out what's available in a given site, the admin interface has a 249 247 complete reference of all the template goodies available to that site. To get 250 that reference, go to your Django admin interface and append ``'doc'`` onto the 251 admin URL. Example: ``http://127.0.0.1/admin/doc/``. In the Django development 252 version, you'll see a "Documentation" link in the upper right of every 253 admin-site page. 248 that reference, go to your Django admin interface and click the "Documentation" 249 link in the upper right of any page. 254 250 255 251 The reference is integrated into the administration interface for your site(s) … … 694 690 ~~~~~~~~~ 695 691 696 **New in Django development version.**697 698 692 Normalizes whitespace between HTML tags to a single space. This includes tab 699 693 characters and newlines.
