Ticket #14000: 14000_1.diff
File 14000_1.diff, 31.4 KB (added by , 14 years ago) |
---|
-
docs/howto/custom-model-fields.txt
4 4 Writing custom model fields 5 5 =========================== 6 6 7 .. versionadded:: 1.08 7 .. currentmodule:: django.db.models 9 8 10 9 Introduction -
docs/howto/custom-template-tags.txt
157 157 Filters and auto-escaping 158 158 ~~~~~~~~~~~~~~~~~~~~~~~~~ 159 159 160 .. versionadded:: 1.0161 162 160 When writing a custom filter, give some thought to how the filter will interact 163 161 with Django's auto-escaping behavior. Note that three types of strings can be 164 162 passed around inside the template code: … … 428 426 Auto-escaping considerations 429 427 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 430 428 431 .. versionadded:: 1.0432 433 429 The output from template tags is **not** automatically run through the 434 430 auto-escaping filters. However, there are still a couple of things you should 435 431 keep in mind when writing a template tag. -
docs/howto/custom-management-commands.txt
4 4 Writing custom django-admin commands 5 5 ==================================== 6 6 7 .. versionadded:: 1.08 9 7 Applications can register their own actions with ``manage.py``. For example, 10 8 you might want to add a ``manage.py`` action for a Django app that you're 11 9 distributing. In this document, we will be building a custom ``closepoll`` -
docs/ref/models/querysets.txt
307 307 308 308 .. method:: reverse() 309 309 310 .. versionadded:: 1.0311 312 310 Use the ``reverse()`` method to reverse the order in which a queryset's 313 311 elements are returned. Calling ``reverse()`` a second time restores the 314 312 ordering back to the normal direction. … … 465 463 466 464 .. method:: values_list(*fields) 467 465 468 .. versionadded:: 1.0469 470 466 This is similar to ``values()`` except that instead of returning dictionaries, 471 467 it returns tuples when iterated over. Each tuple contains the value from the 472 468 respective field passed into the ``values_list()`` call -- so the first item is … … 531 527 532 528 .. method:: none() 533 529 534 .. versionadded:: 1.0535 536 530 Returns an ``EmptyQuerySet`` -- a ``QuerySet`` that always evaluates to 537 531 an empty list. This can be used in cases where you know that you should 538 532 return an empty result set and your caller is expecting a ``QuerySet`` … … 548 542 549 543 .. method:: all() 550 544 551 .. versionadded:: 1.0552 553 545 Returns a ''copy'' of the current ``QuerySet`` (or ``QuerySet`` subclass you 554 546 pass in). This can be useful in some situations where you might want to pass 555 547 in either a model manager or a ``QuerySet`` and do further filtering on the … … 1677 1669 regex 1678 1670 ~~~~~ 1679 1671 1680 .. versionadded:: 1.01681 1682 1672 Case-sensitive regular expression match. 1683 1673 1684 1674 The regular expression syntax is that of the database backend in use. … … 1708 1698 iregex 1709 1699 ~~~~~~ 1710 1700 1711 .. versionadded:: 1.01712 1713 1701 Case-insensitive regular expression match. 1714 1702 1715 1703 Example:: -
docs/ref/models/fields.txt
173 173 174 174 .. attribute:: Field.db_tablespace 175 175 176 .. versionadded:: 1.0177 178 176 The name of the database tablespace to use for this field's index, if this field 179 177 is indexed. The default is the project's :setting:`DEFAULT_INDEX_TABLESPACE` 180 178 setting, if set, or the :attr:`~Field.db_tablespace` of the model, if any. If … … 428 426 ``DecimalField`` 429 427 ---------------- 430 428 431 .. versionadded:: 1.0432 433 429 .. class:: DecimalField(max_digits=None, decimal_places=None, [**options]) 434 430 435 431 A fixed-precision decimal number, represented in Python by a -
docs/ref/models/instances.txt
170 170 The ``pk`` property 171 171 ~~~~~~~~~~~~~~~~~~~ 172 172 173 .. versionadded:: 1.0174 175 173 .. attribute:: Model.pk 176 174 177 175 Regardless of whether you define a primary key field yourself, or let Django … … 280 278 Forcing an INSERT or UPDATE 281 279 ~~~~~~~~~~~~~~~~~~~~~~~~~~~ 282 280 283 .. versionadded:: 1.0284 285 281 In some rare circumstances, it's necessary to be able to force the ``save()`` 286 282 method to perform an SQL ``INSERT`` and not fall back to doing an ``UPDATE``. 287 283 Or vice-versa: update, if possible, but not insert a new row. In these cases -
docs/ref/models/options.txt
67 67 68 68 .. attribute:: Options.db_tablespace 69 69 70 .. versionadded:: 1.071 72 70 The name of the database tablespace to use for the model. If the backend doesn't 73 71 support tablespaces, this option is ignored. 74 72 … … 214 212 appropriate ``UNIQUE`` statements are included in the ``CREATE TABLE`` 215 213 statement). 216 214 217 .. versionadded:: 1.0218 219 215 For convenience, unique_together can be a single list when dealing with a single 220 216 set of fields:: 221 217 -
docs/ref/generic-views.txt
178 178 specified in ``date_field`` is greater than the current date/time. By 179 179 default, this is ``False``. 180 180 181 .. versionadded:: 1.0182 183 181 * ``template_object_name``: Designates the name of the template variable 184 182 to use in the template context. By default, this is ``'latest'``. 185 183 … … 204 202 ordered in reverse. This is equivalent to 205 203 ``queryset.dates(date_field, 'year')[::-1]``. 206 204 207 .. versionchanged:: 1.0208 The behaviour depending on ``template_object_name`` is new in this version.209 210 205 * ``latest``: The ``num_latest`` objects in the system, ordered descending 211 206 by ``date_field``. For example, if ``num_latest`` is ``10``, then 212 207 ``latest`` will be a list of the latest 10 objects in ``queryset``. … … 723 718 724 719 **Template context:** 725 720 726 .. versionadded:: 1.0727 The ``paginator`` and ``page_obj`` context variables are new.728 729 721 In addition to ``extra_context``, the template's context will be: 730 722 731 723 * ``object_list``: The list of objects. This variable's name depends on the -
docs/ref/forms/fields.txt
232 232 ``error_messages`` 233 233 ~~~~~~~~~~~~~~~~~~ 234 234 235 .. versionadded:: 1.0236 237 235 .. attribute:: Field.error_messages 238 236 239 237 The ``error_messages`` argument lets you override the default messages that the … … 451 449 ``DecimalField`` 452 450 ~~~~~~~~~~~~~~~~ 453 451 454 .. versionadded:: 1.0455 456 452 .. class:: DecimalField(**kwargs) 457 453 458 454 * Default widget: ``TextInput`` … … 505 501 ``FileField`` 506 502 ~~~~~~~~~~~~~ 507 503 508 .. versionadded:: 1.0509 510 504 .. class:: FileField(**kwargs) 511 505 512 506 * Default widget: ``FileInput`` … … 525 519 ``FilePathField`` 526 520 ~~~~~~~~~~~~~~~~~ 527 521 528 .. versionadded:: 1.0529 530 522 .. class:: FilePathField(**kwargs) 531 523 532 524 * Default widget: ``Select`` … … 571 563 ``ImageField`` 572 564 ~~~~~~~~~~~~~~ 573 565 574 .. versionadded:: 1.0575 576 566 .. class:: ImageField(**kwargs) 577 567 578 568 * Default widget: ``FileInput`` -
docs/ref/forms/widgets.txt
59 59 60 60 .. class:: DateTimeInput 61 61 62 .. versionadded:: 1.063 64 62 Date/time input as a simple text box: ``<input type='text' ...>`` 65 63 66 64 Takes one optional argument: -
docs/ref/middleware.txt
185 185 186 186 .. class:: django.middleware.csrf.CsrfMiddleware 187 187 188 .. versionadded:: 1.0189 190 188 Adds protection against Cross Site Request Forgeries by adding hidden form 191 189 fields to POST forms and checking requests for the correct value. See the 192 190 :ref:`Cross Site Request Forgery protection documentation <ref-contrib-csrf>`. -
docs/ref/templates/api.txt
428 428 django.core.context_processors.media 429 429 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 430 430 431 .. versionadded:: 1.0432 433 431 If :setting:`TEMPLATE_CONTEXT_PROCESSORS` contains this processor, every 434 432 ``RequestContext`` will contain a variable ``MEDIA_URL``, providing the 435 433 value of the :setting:`MEDIA_URL` setting. -
docs/ref/templates/builtins.txt
21 21 autoescape 22 22 ~~~~~~~~~~ 23 23 24 .. versionadded:: 1.025 26 24 Control the current auto-escaping behavior. This tag takes either ``on`` or 27 25 ``off`` as an argument and that determines whether auto-escaping is in effect 28 26 inside the block. … … 235 233 236 234 You can loop over a list in reverse by using ``{% for obj in list reversed %}``. 237 235 238 .. versionadded:: 1.0239 240 236 If you need to loop over a list of lists, you can unpack the values 241 237 in each sub-list into individual variables. For example, if your context 242 238 contains a list of (x,y) coordinates called ``points``, you could use the … … 1022 1018 with 1023 1019 ~~~~ 1024 1020 1025 .. versionadded:: 1.01026 1027 1021 Caches a complex variable under a simpler name. This is useful when accessing 1028 1022 an "expensive" method (e.g., one that hits the database) multiple times. 1029 1023 … … 1284 1278 escapejs 1285 1279 ~~~~~~~~ 1286 1280 1287 .. versionadded:: 1.01288 1289 1281 Escapes characters for use in JavaScript strings. This does *not* make the 1290 1282 string safe for use in HTML, but does protect you from syntax errors when using 1291 1283 templates to generate JavaScript/JSON. … … 1387 1379 force_escape 1388 1380 ~~~~~~~~~~~~ 1389 1381 1390 .. versionadded:: 1.01391 1392 1382 Applies HTML escaping to a string (see the ``escape`` filter for details). 1393 1383 This filter is applied *immediately* and returns a new, escaped string. This 1394 1384 is useful in the rare cases where you need multiple escaping or want to apply … … 1448 1438 last 1449 1439 ~~~~ 1450 1440 1451 .. versionadded:: 1.01452 1453 1441 Returns the last item in a list. 1454 1442 1455 1443 For example:: -
docs/ref/contrib/gis/index.txt
4 4 GeoDjango 5 5 ========= 6 6 7 .. versionadded:: 1.08 9 7 .. module:: django.contrib.gis 10 8 :synopsis: Geographic Information System (GIS) extensions for Django 11 9 -
docs/ref/contrib/formtools/form-wizard.txt
7 7 .. module:: django.contrib.formtools.wizard 8 8 :synopsis: Splits forms across multiple Web pages. 9 9 10 .. versionadded:: 1.011 12 10 Django comes with an optional "form wizard" application that splits 13 11 :ref:`forms <topics-forms-index>` across multiple Web pages. It maintains 14 12 state in hashed HTML :samp:`<input type="hidden">` fields, and the data isn't -
docs/ref/contrib/humanize.txt
74 74 naturalday 75 75 ---------- 76 76 77 .. versionadded:: 1.078 79 77 For dates that are the current day or within one day, return "today", 80 78 "tomorrow" or "yesterday", as appropriate. Otherwise, format the date using 81 79 the passed in format string. -
docs/ref/contrib/sites.txt
230 230 Caching the current ``Site`` object 231 231 =================================== 232 232 233 .. versionadded:: 1.0234 235 233 As the current site is stored in the database, each call to 236 234 ``Site.objects.get_current()`` could result in a database query. But Django is a 237 235 little cleverer than that: on the first request, the current site is cached, and … … 385 383 386 384 .. _requestsite-objects: 387 385 388 .. versionadded:: 1.0389 390 386 Some :ref:`django.contrib <ref-contrib-index>` applications take advantage of 391 387 the sites framework but are architected in a way that doesn't *require* the 392 388 sites framework to be installed in your database. (Some people don't want to, or -
docs/ref/request-response.txt
49 49 50 50 .. attribute:: HttpRequest.encoding 51 51 52 .. versionadded:: 1.053 54 52 A string representing the current encoding used to decode form submission 55 53 data (or ``None``, which means the ``DEFAULT_CHARSET`` setting is used). 56 54 You can write to this attribute to change the encoding used when accessing … … 191 189 192 190 .. method:: HttpRequest.get_host() 193 191 194 .. versionadded:: 1.0195 196 192 Returns the originating host of the request using information from the 197 193 ``HTTP_X_FORWARDED_HOST`` and ``HTTP_HOST`` headers (in that order). If 198 194 they don't provide a value, the method uses a combination of … … 210 206 211 207 .. method:: HttpRequest.build_absolute_uri(location) 212 208 213 .. versionadded:: 1.0214 215 209 Returns the absolute URI form of ``location``. If no location is provided, 216 210 the location will be set to ``request.get_full_path()``. 217 211 … … 228 222 229 223 .. method:: HttpRequest.is_ajax() 230 224 231 .. versionadded:: 1.0232 233 225 Returns ``True`` if the request was made via an ``XMLHttpRequest``, by 234 226 checking the ``HTTP_X_REQUESTED_WITH`` header for the string 235 227 ``'XMLHttpRequest'``. Most modern JavaScript libraries send this header. … … 578 570 579 571 .. class:: HttpResponseBadRequest 580 572 581 .. versionadded:: 1.0582 583 573 Acts just like :class:`HttpResponse` but uses a 400 status code. 584 574 585 575 .. class:: HttpResponseNotFound -
docs/ref/unicode.txt
4 4 Unicode data 5 5 ============ 6 6 7 .. versionadded:: 1.08 9 7 Django natively supports Unicode data everywhere. Providing your database can 10 8 somehow store the data, you can safely pass around Unicode strings to 11 9 templates, models and the database. -
docs/ref/django-admin.txt
90 90 91 91 .. django-admin:: cleanup 92 92 93 .. versionadded:: 1.094 95 93 Can be run as a cronjob or directly to clean out old data from the database 96 94 (only expired sessions at the moment). 97 95 … … 100 98 101 99 .. django-admin:: compilemessages 102 100 103 .. versionchanged:: 1.0104 Before 1.0 this was the "bin/compile-messages.py" command.105 106 101 Compiles .po files created with ``makemessages`` to .mo files for use with 107 102 the builtin gettext support. See :ref:`topics-i18n`. 108 103 … … 131 126 132 127 .. django-admin:: createsuperuser 133 128 134 .. versionadded:: 1.0135 136 129 Creates a superuser account (a user who has all permissions). This is 137 130 useful if you need to create an initial superuser account but did not 138 131 do so during ``syncdb``, or if you need to programmatically generate … … 831 824 832 825 .. django-admin:: testserver 833 826 834 .. versionadded:: 1.0835 836 827 Runs a Django development server (as in ``runserver``) using data from the 837 828 given fixture(s). 838 829 -
docs/ref/settings.txt
513 513 DEBUG_PROPAGATE_EXCEPTIONS 514 514 -------------------------- 515 515 516 .. versionadded:: 1.0517 518 516 Default: ``False`` 519 517 520 518 If set to True, Django's normal exception handling of view functions … … 578 576 DEFAULT_TABLESPACE 579 577 ------------------ 580 578 581 .. versionadded:: 1.0582 583 579 Default: ``''`` (Empty string) 584 580 585 581 Default tablespace to use for models that don't specify one, if the … … 590 586 DEFAULT_INDEX_TABLESPACE 591 587 ------------------------ 592 588 593 .. versionadded:: 1.0594 595 589 Default: ``''`` (Empty string) 596 590 597 591 Default tablespace to use for indexes on fields that don't specify … … 694 688 EMAIL_USE_TLS 695 689 ------------- 696 690 697 .. versionadded:: 1.0698 699 691 Default: ``False`` 700 692 701 693 Whether to use a TLS (secure) connection when talking to the SMTP server. … … 705 697 FILE_CHARSET 706 698 ------------ 707 699 708 .. versionadded:: 1.0709 710 700 Default: ``'utf-8'`` 711 701 712 702 The character encoding used to decode any files read from disk. This includes … … 717 707 FILE_UPLOAD_HANDLERS 718 708 -------------------- 719 709 720 .. versionadded:: 1.0721 722 710 Default:: 723 711 724 712 ("django.core.files.uploadhandler.MemoryFileUploadHandler", … … 731 719 FILE_UPLOAD_MAX_MEMORY_SIZE 732 720 --------------------------- 733 721 734 .. versionadded:: 1.0735 736 722 Default: ``2621440`` (i.e. 2.5 MB). 737 723 738 724 The maximum size (in bytes) that an upload will be before it gets streamed to … … 743 729 FILE_UPLOAD_TEMP_DIR 744 730 -------------------- 745 731 746 .. versionadded:: 1.0747 748 732 Default: ``None`` 749 733 750 734 The directory to store data temporarily while uploading files. If ``None``, … … 918 902 LANGUAGE_COOKIE_NAME 919 903 -------------------- 920 904 921 .. versionadded:: 1.0922 923 905 Default: ``'django_language'`` 924 906 925 907 The name of the cookie to use for the language cookie. This can be whatever you … … 984 966 LOGIN_REDIRECT_URL 985 967 ------------------ 986 968 987 .. versionadded:: 1.0988 989 969 Default: ``'/accounts/profile/'`` 990 970 991 971 The URL where requests are redirected after login when the … … 999 979 LOGIN_URL 1000 980 --------- 1001 981 1002 .. versionadded:: 1.01003 1004 982 Default: ``'/accounts/login/'`` 1005 983 1006 984 The URL where requests are redirected for login, especially when using the … … 1011 989 LOGOUT_URL 1012 990 ---------- 1013 991 1014 .. versionadded:: 1.01015 1016 992 Default: ``'/accounts/logout/'`` 1017 993 1018 994 LOGIN_URL counterpart. … … 1232 1208 SESSION_ENGINE 1233 1209 -------------- 1234 1210 1235 .. versionadded:: 1.01236 1237 1211 .. versionchanged:: 1.1 1238 1212 The ``cached_db`` backend was added 1239 1213 … … 1283 1257 SESSION_COOKIE_PATH 1284 1258 ------------------- 1285 1259 1286 .. versionadded:: 1.01287 1288 1260 Default: ``'/'`` 1289 1261 1290 1262 The path set on the session cookie. This should either match the URL path of your … … 1321 1293 SESSION_FILE_PATH 1322 1294 ----------------- 1323 1295 1324 .. versionadded:: 1.01325 1326 1296 Default: ``None`` 1327 1297 1328 1298 If you're using file-based session storage, this sets the directory in -
docs/topics/http/file-uploads.txt
6 6 7 7 .. currentmodule:: django.core.files 8 8 9 .. versionadded:: 1.010 11 9 When Django handles a file upload, the file data ends up placed in 12 10 :attr:`request.FILES <django.http.HttpRequest.FILES>` (for more on the 13 11 ``request`` object see the documentation for :ref:`request and response objects -
docs/topics/http/urls.txt
225 225 url 226 226 --- 227 227 228 .. versionadded:: 1.0229 230 228 .. function:: url(regex, view, kwargs=None, name=None, prefix='') 231 229 232 230 You can use the ``url()`` function, instead of a tuple, as an argument to … … 636 634 Naming URL patterns 637 635 =================== 638 636 639 .. versionadded:: 1.0640 641 637 It's fairly common to use the same view function in multiple URL patterns in 642 638 your URLconf. For example, these two URL patterns both point to the ``archive`` 643 639 view:: -
docs/topics/http/sessions.txt
31 31 Configuring the session engine 32 32 ============================== 33 33 34 .. versionadded:: 1.035 36 34 By default, Django stores sessions in your database (using the model 37 35 ``django.contrib.sessions.models.Session``). Though this is convenient, in 38 36 some setups it's faster to store session data elsewhere, so Django can be … … 140 138 141 139 * ``clear()`` 142 140 143 .. versionadded:: 1.0144 ``setdefault()`` and ``clear()`` are new in this version.145 146 141 It also has these methods: 147 142 148 143 * ``flush()`` 149 144 150 .. versionadded:: 1.0151 152 145 Delete the current session data from the session and regenerate the 153 146 session key value that is sent back to the user in the cookie. This is 154 147 used if you want to ensure that the previous session data can't be … … 175 168 176 169 * ``set_expiry(value)`` 177 170 178 .. versionadded:: 1.0179 180 171 Sets the expiration time for the session. You can pass a number of 181 172 different values: 182 173 … … 200 191 201 192 * ``get_expiry_age()`` 202 193 203 .. versionadded:: 1.0204 205 194 Returns the number of seconds until this session expires. For sessions 206 195 with no custom expiration (or those set to expire at browser close), this 207 196 will equal ``settings.SESSION_COOKIE_AGE``. 208 197 209 198 * ``get_expiry_date()`` 210 199 211 .. versionadded:: 1.0212 213 200 Returns the date this session will expire. For sessions with no custom 214 201 expiration (or those set to expire at browser close), this will equal the 215 202 date ``settings.SESSION_COOKIE_AGE`` seconds from now. 216 203 217 204 * ``get_expire_at_browser_close()`` 218 205 219 .. versionadded:: 1.0220 221 206 Returns either ``True`` or ``False``, depending on whether the user's 222 207 session cookie will expire when the user's Web browser is closed. 223 208 … … 304 289 Using sessions out of views 305 290 =========================== 306 291 307 .. versionadded:: 1.0308 309 292 An API is available to manipulate session data outside of a view:: 310 293 311 294 >>> from django.contrib.sessions.backends.db import SessionStore … … 417 400 SESSION_ENGINE 418 401 -------------- 419 402 420 .. versionadded:: 1.0421 422 403 .. versionchanged:: 1.1 423 404 The ``cached_db`` backend was added 424 405 … … 436 417 SESSION_FILE_PATH 437 418 ----------------- 438 419 439 .. versionadded:: 1.0440 441 420 Default: ``/tmp/`` 442 421 443 422 If you're using file-based session storage, this sets the directory in … … 469 448 SESSION_COOKIE_PATH 470 449 ------------------- 471 450 472 .. versionadded:: 1.0473 474 451 Default: ``'/'`` 475 452 476 453 The path set on the session cookie. This should either match the URL path of -
docs/topics/http/shortcuts.txt
49 49 context_instance=RequestContext(request)) 50 50 51 51 ``mimetype`` 52 53 .. versionadded:: 1.054 55 52 The MIME type to use for the resulting document. Defaults to the value of 56 53 the :setting:`DEFAULT_CONTENT_TYPE` setting. 57 54 -
docs/topics/auth.txt
192 192 193 193 .. method:: models.User.set_unusable_password() 194 194 195 .. versionadded:: 1.0196 197 195 Marks the user as having no password set. This isn't the same as 198 196 having a blank string for a password. 199 197 :meth:`~django.contrib.auth.models.User.check_password()` for this user … … 205 203 206 204 .. method:: models.User.has_usable_password() 207 205 208 .. versionadded:: 1.0209 210 206 Returns ``False`` if 211 207 :meth:`~django.contrib.auth.models.User.set_unusable_password()` has 212 208 been called for this user. … … 397 393 only supported on platforms that have the standard Python ``crypt`` module 398 394 available. 399 395 400 .. versionadded:: 1.0401 Support for the ``crypt`` module is new in Django 1.0.402 403 396 For example:: 404 397 405 398 sha1$a1976$a36cc8cbf81742a8fb52e221aaeab48ed7f58ab4 … … 452 445 Creating superusers 453 446 ------------------- 454 447 455 .. versionadded:: 1.0456 The ``manage.py createsuperuser`` command is new.457 458 448 :djadmin:`manage.py syncdb <syncdb>` prompts you to create a superuser the 459 449 first time you run it after adding ``'django.contrib.auth'`` to your 460 450 :setting:`INSTALLED_APPS`. If you need to create a superuser at a later date, -
docs/topics/files.txt
4 4 Managing files 5 5 ============== 6 6 7 .. versionadded:: 1.08 9 7 This document describes Django's file access APIs. 10 8 11 9 By default, Django stores files locally, using the :setting:`MEDIA_ROOT` and -
docs/topics/cache.txt
197 197 Using a custom cache backend 198 198 ---------------------------- 199 199 200 .. versionadded:: 1.0201 202 200 While Django includes support for a number of cache backends out-of-the-box, 203 201 sometimes you might want to use a customized cache backend. To use an external 204 202 cache backend with Django, use a Python import path as the scheme portion (the … … 400 398 Template fragment caching 401 399 ========================= 402 400 403 .. versionadded:: 1.0404 405 401 If you're after even more control, you can also cache template fragments using 406 402 the ``cache`` template tag. To give your template access to this tag, put 407 403 ``{% load cache %}`` near the top of your template. -
docs/topics/db/models.txt
389 389 Extra fields on many-to-many relationships 390 390 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 391 391 392 .. versionadded:: 1.0393 394 392 When you're only dealing with simple many-to-many relationships such as 395 393 mixing and matching pizzas and toppings, a standard :class:`~django.db.models.ManyToManyField` is all you need. However, sometimes 396 394 you may need to associate data with the relationship between two models. … … 607 605 Custom field types 608 606 ------------------ 609 607 610 .. versionadded:: 1.0611 612 608 If one of the existing model fields cannot be used to fit your purposes, or if 613 609 you wish to take advantage of some less common database column types, you can 614 610 create your own field class. Full coverage of creating your own fields is … … 770 766 Model inheritance 771 767 ================= 772 768 773 .. versionadded:: 1.0774 775 769 Model inheritance in Django works almost identically to the way normal 776 770 class inheritance works in Python. The only decision you have to make 777 771 is whether you want the parent models to be models in their own right -
docs/topics/db/queries.txt
439 439 Spanning multi-valued relationships 440 440 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 441 441 442 .. versionadded:: 1.0443 444 442 When you are filtering an object based on a ``ManyToManyField`` or a reverse 445 443 ``ForeignKey``, there are two different sorts of filter you may be 446 444 interested in. Consider the ``Blog``/``Entry`` relationship (``Blog`` to … … 768 766 Updating multiple objects at once 769 767 ================================= 770 768 771 .. versionadded:: 1.0772 773 769 Sometimes you want to set a field to a particular value for all the objects in 774 770 a ``QuerySet``. You can do this with the ``update()`` method. For example:: 775 771 -
docs/topics/forms/modelforms.txt
108 108 =============================== ======================================== 109 109 110 110 111 .. versionadded:: 1.0112 The ``FloatField`` form field and ``DecimalField`` model and form fields113 are new in Django 1.0.114 115 111 .. versionadded:: 1.2 116 112 The ``BigIntegerField`` is new in Django 1.2. 117 113 -
docs/topics/testing.txt
258 258 259 259 Note that we used ``animals``, not ``myproject.animals``. 260 260 261 .. versionadded:: 1.0262 You can now choose which test to run.263 264 261 You can be even *more* specific by naming an individual test case. To 265 262 run a single test case in an application (for example, the 266 263 ``AnimalTestCase`` described in the "Writing unit tests" section), add … … 749 746 750 747 .. method:: Client.login(**credentials) 751 748 752 .. versionadded:: 1.0753 754 749 If your site uses Django's :ref:`authentication system<topics-auth>` 755 750 and you deal with logging in users, you can use the test client's 756 751 ``login()`` method to simulate the effect of a user logging into the … … 795 790 796 791 .. method:: Client.logout() 797 792 798 .. versionadded:: 1.0799 800 793 If your site uses Django's :ref:`authentication system<topics-auth>`, 801 794 the ``logout()`` method can be used to simulate the effect of a user 802 795 logging out of your site. … … 999 992 Default test client 1000 993 ~~~~~~~~~~~~~~~~~~~ 1001 994 1002 .. versionadded:: 1.01003 1004 995 .. attribute:: TestCase.client 1005 996 1006 997 Every test case in a ``django.test.TestCase`` instance has access to an … … 1103 1094 URLconf configuration 1104 1095 ~~~~~~~~~~~~~~~~~~~~~ 1105 1096 1106 .. versionadded:: 1.01107 1108 1097 .. attribute:: TestCase.urls 1109 1098 1110 1099 If your application provides views, you may want to include tests that use the … … 1172 1161 Emptying the test outbox 1173 1162 ~~~~~~~~~~~~~~~~~~~~~~~~ 1174 1163 1175 .. versionadded:: 1.01176 1177 1164 If you use Django's custom ``TestCase`` class, the test runner will clear the 1178 1165 contents of the test e-mail outbox at the start of each test case. 1179 1166 … … 1182 1169 Assertions 1183 1170 ~~~~~~~~~~ 1184 1171 1185 .. versionadded:: 1.01186 1187 1172 .. versionchanged:: 1.2 1188 1173 Addded ``msg_prefix`` argument. 1189 1174 … … 1266 1251 E-mail services 1267 1252 --------------- 1268 1253 1269 .. versionadded:: 1.01270 1271 1254 If any of your Django views send e-mail using :ref:`Django's e-mail 1272 1255 functionality <topics-email>`, you probably don't want to send e-mail each time 1273 1256 you run a test using that view. For this reason, Django's test runner -
docs/topics/email.txt
198 198 The EmailMessage class 199 199 ====================== 200 200 201 .. versionadded:: 1.0202 203 201 Django's :meth:`~django.core.mail.send_mail()` and 204 202 :meth:`~django.core.mail.send_mass_mail()` functions are actually thin 205 203 wrappers that make use of the :class:`~django.core.mail.EmailMessage` class. -
docs/topics/templates.txt
392 392 Automatic HTML escaping 393 393 ======================= 394 394 395 .. versionadded:: 1.0396 397 395 When generating HTML from templates, there's always a risk that a variable will 398 396 include characters that affect the resulting HTML. For example, consider this 399 397 template fragment::