Ticket #15233: adjusted-module-directives.patch

File adjusted-module-directives.patch, 28.9 KB (added by Aryeh Leib Taurog <vim@…>, 14 years ago)

patch for documentation module paths

  • docs/howto/custom-model-fields.txt

     
    308308Custom database types
    309309~~~~~~~~~~~~~~~~~~~~~
    310310
    311 .. method:: db_type(self, connection)
     311.. method:: Field.db_type(self, connection)
    312312
    313313.. versionadded:: 1.2
    314314   The ``connection`` argument was added to support multiple databases.
     
    398398Converting database values to Python objects
    399399~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    400400
    401 .. method:: to_python(self, value)
     401.. method:: Field.to_python(self, value)
    402402
    403403Converts a value as returned by your database (or a serializer) to a Python
    404404object.
     
    447447Converting Python objects to query values
    448448~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    449449
    450 .. method:: get_prep_value(self, value)
     450.. method:: Field.get_prep_value(self, value)
    451451
    452452.. versionadded:: 1.2
    453453   This method was factored out of ``get_db_prep_value()``
     
    475475Converting query values to database values
    476476~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    477477
    478 .. method:: get_db_prep_value(self, value, connection, prepared=False)
     478.. method:: Field.get_db_prep_value(self, value, connection, prepared=False)
    479479
    480480.. versionadded:: 1.2
    481481   The ``connection`` and ``prepared`` arguments were added to support multiple databases.
     
    494494initial data conversions before performing any database-specific
    495495processing.
    496496
    497 .. method:: get_db_prep_save(self, value, connection)
     497.. method:: Field.get_db_prep_save(self, value, connection)
    498498
    499499.. versionadded:: 1.2
    500500   The ``connection`` argument was added to support multiple databases.
     
    509509Preprocessing values before saving
    510510~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    511511
    512 .. method:: pre_save(self, model_instance, add)
     512.. method:: Field.pre_save(self, model_instance, add)
    513513
    514514This method is called just prior to :meth:`get_db_prep_save` and should return
    515515the value of the appropriate attribute from ``model_instance`` for this field.
     
    535535As with value conversions, preparing a value for database lookups is a
    536536two phase process.
    537537
    538 .. method:: get_prep_lookup(self, lookup_type, value)
     538.. method:: Field.get_prep_lookup(self, lookup_type, value)
    539539
    540540.. versionadded:: 1.2
    541541   This method was factored out of ``get_db_prep_lookup()``
     
    586586            else:
    587587                raise TypeError('Lookup type %r not supported.' % lookup_type)
    588588
    589 .. method:: get_db_prep_lookup(self, lookup_type, value, connection, prepared=False)
     589.. method:: Field.get_db_prep_lookup(self, lookup_type, value, connection, prepared=False)
    590590
    591591.. versionadded:: 1.2
    592592   The ``connection`` and ``prepared`` arguments were added to support multiple databases.
     
    600600Specifying the form field for a model field
    601601~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    602602
    603 .. method:: formfield(self, form_class=forms.CharField, **kwargs)
     603.. method:: Field.formfield(self, form_class=forms.CharField, **kwargs)
    604604
    605605Returns the default form field to use when this field is displayed in a model.
    606606This method is called by the :class:`~django.forms.ModelForm` helper.
     
    635635Emulating built-in field types
    636636~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    637637
    638 .. method:: get_internal_type(self)
     638.. method:: Field.get_internal_type(self)
    639639
    640640Returns a string giving the name of the :class:`~django.db.models.Field`
    641641subclass we are emulating at the database level. This is used to determine the
     
    669669Converting field data for serialization
    670670~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    671671
    672 .. method:: value_to_string(self, obj)
     672.. method:: Field.value_to_string(self, obj)
    673673
    674674This method is used by the serializers to convert the field into a string for
    675675output. Calling :meth:`Field._get_val_from_obj(obj)` is the best way to get the
  • docs/topics/http/file-uploads.txt

     
    22File Uploads
    33============
    44
    5 .. currentmodule:: django.core.files
     5.. currentmodule:: django.core.files.uploadedfile
    66
    77When Django handles a file upload, the file data ends up placed in
    88:attr:`request.FILES <django.http.HttpRequest.FILES>` (for more on the
     
    5959Handling uploaded files
    6060-----------------------
    6161
    62 The final piece of the puzzle is handling the actual file data from
    63 :attr:`request.FILES <django.http.HttpRequest.FILES>`. Each entry in this
    64 dictionary is an ``UploadedFile`` object -- a simple wrapper around an uploaded
    65 file. You'll usually use one of these methods to access the uploaded content:
     62.. class:: UploadedFile
    6663
    67     ``UploadedFile.read()``
     64    The final piece of the puzzle is handling the actual file data from
     65    :attr:`request.FILES <django.http.HttpRequest.FILES>`. Each entry in this
     66    dictionary is an ``UploadedFile`` object -- a simple wrapper around an uploaded
     67    file. You'll usually use one of these methods to access the uploaded content:
     68
     69    .. method:: read()
     70
    6871        Read the entire uploaded data from the file. Be careful with this
    6972        method: if the uploaded file is huge it can overwhelm your system if you
    7073        try to read it into memory. You'll probably want to use ``chunks()``
    7174        instead; see below.
    7275
    73     ``UploadedFile.multiple_chunks()``
     76    .. method:: multiple_chunks()
     77
    7478        Returns ``True`` if the uploaded file is big enough to require
    7579        reading in multiple chunks. By default this will be any file
    7680        larger than 2.5 megabytes, but that's configurable; see below.
    7781
    78     ``UploadedFile.chunks()``
     82    .. method:: chunks()
     83
    7984        A generator returning chunks of the file. If ``multiple_chunks()`` is
    8085        ``True``, you should use this method in a loop instead of ``read()``.
    8186
    8287        In practice, it's often easiest simply to use ``chunks()`` all the time;
    8388        see the example below.
    8489
    85     ``UploadedFile.name``
     90    .. attribute:: name
     91
    8692        The name of the uploaded file (e.g. ``my_file.txt``).
    8793
    88     ``UploadedFile.size``
     94    .. attribute:: size
     95
    8996        The size, in bytes, of the uploaded file.
    9097
    9198There are a few other methods and attributes available on ``UploadedFile``
     
    177184``UploadedFile`` objects
    178185========================
    179186
    180 .. class:: UploadedFile
    181 
    182187In addition to those inherited from :class:`File`, all ``UploadedFile`` objects
    183188define the following methods/attributes:
    184189
    185     ``UploadedFile.content_type``
    186         The content-type header uploaded with the file (e.g. ``text/plain`` or
    187         ``application/pdf``). Like any data supplied by the user, you shouldn't
    188         trust that the uploaded file is actually this type. You'll still need to
    189         validate that the file contains the content that the content-type header
    190         claims -- "trust but verify."
     190.. attribute:: UploadedFile.content_type
    191191
    192     ``UploadedFile.charset``
    193         For ``text/*`` content-types, the character set (i.e. ``utf8``) supplied
    194         by the browser. Again, "trust but verify" is the best policy here.
     192    The content-type header uploaded with the file (e.g. ``text/plain`` or
     193    ``application/pdf``). Like any data supplied by the user, you shouldn't
     194    trust that the uploaded file is actually this type. You'll still need to
     195    validate that the file contains the content that the content-type header
     196    claims -- "trust but verify."
    195197
    196     ``UploadedFile.temporary_file_path()``
    197         Only files uploaded onto disk will have this method; it returns the full
    198         path to the temporary uploaded file.
     198.. attribute:: UploadedFile.charset
    199199
     200    For ``text/*`` content-types, the character set (i.e. ``utf8``) supplied
     201    by the browser. Again, "trust but verify" is the best policy here.
     202
     203.. attribute:: UploadedFile.temporary_file_path()
     204
     205    Only files uploaded onto disk will have this method; it returns the full
     206    path to the temporary uploaded file.
     207
    200208.. note::
    201209
    202210    Like regular Python files, you can read the file line-by-line simply by
  • docs/topics/http/decorators.txt

     
    4545headers; see
    4646:doc:`conditional view processing </topics/conditional-view-processing>`.
    4747
    48 .. currentmodule:: django.views.decorators.http
     48.. currentmodule:: django.views.decorators.gzip
    4949
    5050GZip compression
    5151================
  • docs/topics/http/urls.txt

     
    765765Utility methods
    766766===============
    767767
     768.. module:: django.core.urlresolvers
     769
    768770reverse()
    769771---------
    770772
  • docs/topics/auth.txt

     
    615615Manually checking a user's password
    616616-----------------------------------
    617617
     618.. currentmodule:: django.contrib.auth.models
     619
    618620.. function:: check_password()
    619621
    620622    If you'd like to manually authenticate a user by comparing a plain-text
     
    627629How to log a user out
    628630---------------------
    629631
     632.. currentmodule:: django.contrib.auth
     633
    630634.. function:: logout()
    631635
    632636    To log out a user who has been logged in via
     
    869873Other built-in views
    870874--------------------
    871875
     876.. module:: django.contrib.auth.views
     877
    872878In addition to the :func:`~views.login` view, the authentication system
    873879includes a few other useful built-in views located in
    874880:mod:`django.contrib.auth.views`:
    875881
    876 .. function:: views.logout(request, [next_page, template_name, redirect_field_name])
     882.. function:: logout(request, [next_page, template_name, redirect_field_name])
    877883
    878884    Logs a user out.
    879885
     
    893899
    894900        * ``title``: The string "Logged out", localized.
    895901
    896 .. function:: views.logout_then_login(request[, login_url])
     902.. function:: logout_then_login(request[, login_url])
    897903
    898904    Logs a user out, then redirects to the login page.
    899905
     
    902908        * ``login_url``: The URL of the login page to redirect to. This will
    903909          default to :setting:`settings.LOGIN_URL <LOGIN_URL>` if not supplied.
    904910
    905 .. function:: views.password_change(request[, template_name, post_change_redirect, password_change_form])
     911.. function:: password_change(request[, template_name, post_change_redirect, password_change_form])
    906912
    907913    Allows a user to change their password.
    908914
     
    926932
    927933        * ``form``: The password change form.
    928934
    929 .. function:: views.password_change_done(request[, template_name])
     935.. function:: password_change_done(request[, template_name])
    930936
    931937    The page shown after a user has changed their password.
    932938
     
    936942          default to :file:`registration/password_change_done.html` if not
    937943          supplied.
    938944
    939 .. function:: views.password_reset(request[, is_admin_site, template_name, email_template_name, password_reset_form, token_generator, post_reset_redirect, from_email])
     945.. function:: password_reset(request[, is_admin_site, template_name, email_template_name, password_reset_form, token_generator, post_reset_redirect, from_email])
    940946
    941947    Allows a user to reset their password by generating a one-time use link
    942948    that can be used to reset the password, and sending that link to the
     
    971977
    972978        * ``form``: The form for resetting the user's password.
    973979
    974 .. function:: views.password_reset_done(request[, template_name])
     980.. function:: password_reset_done(request[, template_name])
    975981
    976982    The page shown after a user has reset their password.
    977983
     
    981987          default to :file:`registration/password_reset_done.html` if not
    982988          supplied.
    983989
    984 .. function:: views.redirect_to_login(next[, login_url, redirect_field_name])
     990.. function:: redirect_to_login(next[, login_url, redirect_field_name])
    985991
    986992    Redirects to the login page, and then back to another URL after a
    987993    successful login.
     
    9991005          URL to redirect to after log out. Overrides ``next`` if the given
    10001006          ``GET`` parameter is passed.
    10011007
     1008
    10021009.. function:: password_reset_confirm(request[, uidb36, token, template_name, token_generator, set_password_form, post_reset_redirect])
    10031010
    10041011    Presents a form for entering a new password.
  • docs/ref/models/querysets.txt

     
    22QuerySet API reference
    33======================
    44
    5 .. currentmodule:: django.db.models.QuerySet
     5.. currentmodule:: django.db.models.query
    66
    77This document describes the details of the ``QuerySet`` API. It builds on the
    88material presented in the :doc:`model </topics/db/models>` and :doc:`database
     
    137137filter
    138138~~~~~~
    139139
    140 .. method:: filter(**kwargs)
     140.. method:: QuerySet.filter(**kwargs)
    141141
    142142Returns a new ``QuerySet`` containing objects that match the given lookup
    143143parameters.
     
    149149exclude
    150150~~~~~~~
    151151
    152 .. method:: exclude(**kwargs)
     152.. method:: QuerySet.exclude(**kwargs)
    153153
    154154Returns a new ``QuerySet`` containing objects that do *not* match the given
    155155lookup parameters.
     
    184184annotate
    185185~~~~~~~~
    186186
    187 .. method:: annotate(*args, **kwargs)
     187.. method:: QuerySet.annotate(*args, **kwargs)
    188188
    189189Annotates each object in the ``QuerySet`` with the provided list of
    190190aggregate values (averages, sums, etc) that have been computed over
     
    226226order_by
    227227~~~~~~~~
    228228
    229 .. method:: order_by(*fields)
     229.. method:: QuerySet.order_by(*fields)
    230230
    231231By default, results returned by a ``QuerySet`` are ordered by the ordering
    232232tuple given by the ``ordering`` option in the model's ``Meta``. You can
     
    291291reverse
    292292~~~~~~~
    293293
    294 .. method:: reverse()
     294.. method:: QuerySet.reverse()
    295295
    296296Use the ``reverse()`` method to reverse the order in which a queryset's
    297297elements are returned. Calling ``reverse()`` a second time restores the
     
    319319distinct
    320320~~~~~~~~
    321321
    322 .. method:: distinct()
     322.. method:: QuerySet.distinct()
    323323
    324324Returns a new ``QuerySet`` that uses ``SELECT DISTINCT`` in its SQL query. This
    325325eliminates duplicate rows from the query results.
     
    352352values
    353353~~~~~~
    354354
    355 .. method:: values(*fields)
     355.. method:: QuerySet.values(*fields)
    356356
    357357Returns a ``ValuesQuerySet`` -- a ``QuerySet`` that returns dictionaries when
    358358used as an iterable, rather than model-instance objects.
     
    458458values_list
    459459~~~~~~~~~~~
    460460
    461 .. method:: values_list(*fields)
     461.. method:: QuerySet.values_list(*fields)
    462462
    463463This is similar to ``values()`` except that instead of returning dictionaries,
    464464it returns tuples when iterated over. Each tuple contains the value from the
     
    486486dates
    487487~~~~~
    488488
    489 .. method:: dates(field, kind, order='ASC')
     489.. method:: QuerySet.dates(field, kind, order='ASC')
    490490
    491491Returns a ``DateQuerySet`` -- a ``QuerySet`` that evaluates to a list of
    492492``datetime.datetime`` objects representing all available dates of a particular
     
    522522none
    523523~~~~
    524524
    525 .. method:: none()
     525.. method:: QuerySet.none()
    526526
    527527Returns an ``EmptyQuerySet`` -- a ``QuerySet`` that always evaluates to
    528528an empty list. This can be used in cases where you know that you should
     
    537537all
    538538~~~
    539539
    540 .. method:: all()
     540.. method:: QuerySet.all()
    541541
    542542Returns a *copy* of the current ``QuerySet`` (or ``QuerySet`` subclass you
    543543pass in). This can be useful in some situations where you might want to pass
     
    550550select_related
    551551~~~~~~~~~~~~~~
    552552
    553 .. method:: select_related()
     553.. method:: QuerySet.select_related()
    554554
    555555Returns a ``QuerySet`` that will automatically "follow" foreign-key
    556556relationships, selecting that additional related-object data when it executes
     
    666666extra
    667667~~~~~
    668668
    669 .. method:: extra(select=None, where=None, params=None, tables=None, order_by=None, select_params=None)
     669.. method:: QuerySet.extra(select=None, where=None, params=None, tables=None, order_by=None, select_params=None)
    670670
    671671Sometimes, the Django query syntax by itself can't easily express a complex
    672672``WHERE`` clause. For these edge cases, Django provides the ``extra()``
     
    827827defer
    828828~~~~~
    829829
    830 .. method:: defer(*fields)
     830.. method:: QuerySet.defer(*fields)
    831831
    832832In some complex data-modeling situations, your models might contain a lot of
    833833fields, some of which could contain a lot of data (for example, text fields),
     
    887887only
    888888~~~~
    889889
    890 .. method:: only(*fields)
     890.. method:: QuerySet.only(*fields)
    891891
    892892The ``only()`` method is more or less the opposite of ``defer()``. You
    893893call it with the fields that should *not* be deferred when retrieving a model.
     
    923923using
    924924~~~~~
    925925
    926 .. method:: using(alias)
     926.. method:: QuerySet.using(alias)
    927927
    928928.. versionadded:: 1.2
    929929
     
    953953get
    954954~~~
    955955
    956 .. method:: get(**kwargs)
     956.. method:: QuerySet.get(**kwargs)
    957957
    958958Returns the object matching the given lookup parameters, which should be in
    959959the format described in `Field lookups`_.
     
    982982create
    983983~~~~~~
    984984
    985 .. method:: create(**kwargs)
     985.. method:: QuerySet.create(**kwargs)
    986986
    987987A convenience method for creating an object and saving it all in one step.  Thus::
    988988
     
    10061006get_or_create
    10071007~~~~~~~~~~~~~
    10081008
    1009 .. method:: get_or_create(**kwargs)
     1009.. method:: QuerySet.get_or_create(**kwargs)
    10101010
    10111011A convenience method for looking up an object with the given kwargs, creating
    10121012one if necessary.
     
    10761076count
    10771077~~~~~
    10781078
    1079 .. method:: count()
     1079.. method:: QuerySet.count()
    10801080
    10811081Returns an integer representing the number of objects in the database matching
    10821082the ``QuerySet``. ``count()`` never raises exceptions.
     
    11021102in_bulk
    11031103~~~~~~~
    11041104
    1105 .. method:: in_bulk(id_list)
     1105.. method:: QuerySet.in_bulk(id_list)
    11061106
    11071107Takes a list of primary-key values and returns a dictionary mapping each
    11081108primary-key value to an instance of the object with the given ID.
     
    11211121iterator
    11221122~~~~~~~~
    11231123
    1124 .. method:: iterator()
     1124.. method:: QuerySet.iterator()
    11251125
    11261126Evaluates the ``QuerySet`` (by performing the query) and returns an
    11271127`iterator`_ over the results. A ``QuerySet`` typically caches its
     
    11391139latest
    11401140~~~~~~
    11411141
    1142 .. method:: latest(field_name=None)
     1142.. method:: QuerySet.latest(field_name=None)
    11431143
    11441144Returns the latest object in the table, by date, using the ``field_name``
    11451145provided as the date field.
     
    11611161aggregate
    11621162~~~~~~~~~
    11631163
    1164 .. method:: aggregate(*args, **kwargs)
     1164.. method:: QuerySet.aggregate(*args, **kwargs)
    11651165
    11661166Returns a dictionary of aggregate values (averages, sums, etc) calculated
    11671167over the ``QuerySet``. Each argument to ``aggregate()`` specifies
     
    11931193exists
    11941194~~~~~~
    11951195
    1196 .. method:: exists()
     1196.. method:: QuerySet.exists()
    11971197
    11981198.. versionadded:: 1.2
    11991199
     
    12091209update
    12101210~~~~~~
    12111211
    1212 .. method:: update(**kwargs)
     1212.. method:: QuerySet.update(**kwargs)
    12131213
    12141214Performs an SQL update query for the specified fields, and returns
    12151215the number of rows affected. The ``update()`` method is applied instantly and
     
    12341234delete
    12351235~~~~~~
    12361236
    1237 .. method:: delete()
     1237.. method:: QuerySet.delete()
    12381238
    12391239Performs an SQL delete query on all rows in the :class:`QuerySet`. The
    12401240``delete()`` is applied instantly. You cannot call ``delete()`` on a
     
    17491749Aggregation functions
    17501750---------------------
    17511751
     1752.. module:: django.db.models.aggregates
     1753
    17521754Django provides the following aggregation functions in the
    17531755``django.db.models`` module. For details on how to use these
    17541756aggregate functions, see
  • docs/ref/forms/widgets.txt

     
    160160    Takes two optional arguments, ``date_format`` and ``time_format``, which
    161161    work just like the ``format`` argument for ``DateInput`` and ``TimeInput``.
    162162
     163.. module:: django.forms.extras.widgets
     164
    163165.. class:: SelectDateWidget
    164166
    165167    Wrapper around three select widgets: one each for month, day, and year.
     
    180182
    181183Specifying widgets
    182184------------------
     185.. currentmodule:: django.forms
    183186
    184187.. attribute:: Form.widget
    185188
  • docs/ref/contrib/gis/gdal.txt

     
    9797``Layer``
    9898---------
    9999
     100.. module:: django.contrib.gis.gdal.layer
     101
    100102.. class:: Layer
    101103
    102104   ``Layer`` is a wrapper for a layer of data in a ``DataSource`` object.
     
    266268``Feature``
    267269-----------
    268270
     271.. module:: django.contrib.gis.gdal.feature
     272
    269273.. class:: Feature
    270274
    271275
     
    340344``Field``
    341345---------
    342346
     347.. module:: django.contrib.gis.gdal.field
     348
    343349.. class:: Field
    344350
    345351   .. attribute:: name
     
    420426``Driver``
    421427----------
    422428
     429.. currentmodule:: django.contrib.gis.gdal
     430
    423431.. class:: Driver(dr_input)
    424432
    425433   The ``Driver`` class is used internally to wrap an OGR :class:`DataSource` driver.
     
    730738
    731739   An alias for :attr:`tuple`.
    732740
     741.. module:: django.contrib.gis.gdal.geometries
     742
    733743.. class:: Point
    734744
    735745   .. attribute:: x
     
    805815``OGRGeomType``
    806816---------------
    807817
     818.. currentmodule:: django.contrib.gis.gdal
     819
    808820.. class:: OGRGeomType(type_input)
    809821
    810822   This class allows for the representation of an OGR geometry type
  • docs/ref/contrib/gis/geos.txt

     
    717717``PreparedGeometry``
    718718--------------------
    719719
     720.. currentmodule: django.contrib.gis.geos.prepared
     721
    720722.. class:: PreparedGeometry
    721723
    722724  All methods on ``PreparedGeometry`` take an ``other`` argument, which
     
    733735Geometry Factories
    734736==================
    735737
     738.. currentmodule:: django.contrib.gis.geos
     739
    736740.. function:: fromfile(file_h)
    737741
    738742   :param file_h: input file that contains spatial data
  • docs/ref/contrib/gis/geoquerysets.txt

     
    44GeoQuerySet API Reference
    55=========================
    66
    7 .. currentmodule:: django.contrib.gis.db.models
     7.. currentmodule:: django.contrib.gis.db.models.query
    88
    99.. class:: GeoQuerySet([model=None])
    1010
     
    12081208``Collect``
    12091209~~~~~~~~~~~
    12101210
     1211.. currentmodule:: django.contrib.gis.db.models
     1212
    12111213.. class:: Collect(geo_field)
    12121214
    12131215Returns the same as the :meth:`GeoQuerySet.collect` aggregate method.
  • docs/ref/contrib/formtools/form-preview.txt

     
    22Form preview
    33============
    44
    5 .. module:: django.contrib.formtools
     5.. module:: django.contrib.formtools.preview
    66    :synopsis: Displays an HTML form, forces a preview, then does something
    77               with the submission.
    88
     
    2626      b. If it's not valid, redisplays the form with error messages.
    2727   3. When the "confirmation" form is submitted from the preview page, calls
    2828      a hook that you define -- a
    29       :meth:`~django.contrib.formtools.FormPreview.done()` method that gets
     29      :meth:`~django.contrib.formtools.preview.FormPreview.done()` method that gets
    3030      passed the valid data.
    3131
    3232The framework enforces the required preview by passing a shared-secret hash to
     
    5050              :file:`django/contrib/formtools/templates` directory, and add that
    5151              directory to your :setting:`TEMPLATE_DIRS` setting.
    5252
    53     2. Create a :class:`~django.contrib.formtools.FormPreview` subclass that
    54        overrides the :meth:`~django.contrib.formtools.FormPreview.done()`
     53    2. Create a :class:`~django.contrib.formtools.preview.FormPreview` subclass that
     54       overrides the :meth:`~django.contrib.formtools.preview.FormPreview.done()`
    5555       method::
    5656
    5757           from django.contrib.formtools.preview import FormPreview
     
    7070       is the end result of the form being submitted.
    7171
    7272    3. Change your URLconf to point to an instance of your
    73        :class:`~django.contrib.formtools.FormPreview` subclass::
     73       :class:`~django.contrib.formtools.preview.FormPreview` subclass::
    7474
    7575           from myapp.preview import SomeModelFormPreview
    7676           from myapp.forms import SomeModelForm
     
    8989
    9090.. class:: FormPreview
    9191
    92 A :class:`~django.contrib.formtools.FormPreview` class is a simple Python class
     92A :class:`~django.contrib.formtools.preview.FormPreview` class is a simple Python class
    9393that represents the preview workflow.
    94 :class:`~django.contrib.formtools.FormPreview` classes must subclass
     94:class:`~django.contrib.formtools.preview.FormPreview` classes must subclass
    9595``django.contrib.formtools.preview.FormPreview`` and override the
    96 :meth:`~django.contrib.formtools.FormPreview.done()` method. They can live
     96:meth:`~django.contrib.formtools.preview.FormPreview.done()` method. They can live
    9797anywhere in your codebase.
    9898
    9999``FormPreview`` templates
     
    102102By default, the form is rendered via the template :file:`formtools/form.html`,
    103103and the preview page is rendered via the template :file:`formtools/preview.html`.
    104104These values can be overridden for a particular form preview by setting
    105 :attr:`~django.contrib.formtools.FormPreview.preview_template` and
    106 :attr:`~django.contrib.formtools.FormPreview.form_template` attributes on the
     105:attr:`~django.contrib.formtools.preview.FormPreview.preview_template` and
     106:attr:`~django.contrib.formtools.preview.FormPreview.form_template` attributes on the
    107107FormPreview subclass. See :file:`django/contrib/formtools/templates` for the
    108108default templates.
    109109
  • docs/ref/contrib/admin/index.txt

     
    11091109``InlineModelAdmin`` objects
    11101110============================
    11111111
     1112.. currentmodule:: django.contrib.admin.options
     1113
    11121114.. class:: InlineModelAdmin
    11131115
    11141116    The admin interface has the ability to edit models on the same page as a
     
    15371539``AdminSite`` objects
    15381540=====================
    15391541
     1542.. currentmodule:: django.contrib.admin
     1543
    15401544.. class:: AdminSite(name=None)
    15411545
    15421546    A Django administrative site is represented by an instance of
  • docs/ref/utils.txt

     
    109109
    110110Extra methods that ``SortedDict`` adds to the standard Python ``dict`` class.
    111111
    112 .. method:: insert(index, key, value)
     112.. method:: SortedDict.insert(index, key, value)
    113113
    114114Inserts the key, value pair before the item with the given index.
    115115
    116 .. method:: value_for_index(index)
     116.. method:: SortedDict.value_for_index(index)
    117117
    118118Returns the value of the item at the given zero-based index.
    119119
     
    227227Methods
    228228~~~~~~~
    229229
    230 .. method:: add_item(title, link, description, [author_email=None, author_name=None, author_link=None, pubdate=None, comments=None, unique_id=None, enclosure=None, categories=(), item_copyright=None, ttl=None, **kwargs])
     230.. method:: SyndicationFeed.add_item(title, link, description, [author_email=None, author_name=None, author_link=None, pubdate=None, comments=None, unique_id=None, enclosure=None, categories=(), item_copyright=None, ttl=None, **kwargs])
    231231
    232232Adds an item to the feed. All args are expected to be Python ``unicode``
    233233objects except ``pubdate``, which is a ``datetime.datetime`` object, and
    234234``enclosure``, which is an instance of the ``Enclosure`` class.
    235235
    236 .. method:: num_items()
     236.. method:: SyndicationFeed.num_items()
    237237
    238 .. method:: root_attributes()
     238.. method:: SyndicationFeed.root_attributes()
    239239
    240240Return extra attributes to place on the root (i.e. feed/channel) element.
    241241Called from write().
    242242
    243 .. method:: add_root_elements(handler)
     243.. method:: SyndicationFeed.add_root_elements(handler)
    244244
    245245Add elements in the root (i.e. feed/channel) element. Called from write().
    246246
    247 .. method:: item_attributes(item)
     247.. method:: SyndicationFeed.item_attributes(item)
    248248
    249249Return extra attributes to place on each item (i.e. item/entry) element.
    250250
    251 .. method:: add_item_elements(handler, item)
     251.. method:: SyndicationFeed.add_item_elements(handler, item)
    252252
    253253Add elements on each item (i.e. item/entry) element.
    254254
    255 .. method:: write(outfile, encoding)
     255.. method:: SyndicationFeed.write(outfile, encoding)
    256256
    257257Outputs the feed in the given encoding to ``outfile``, which is a file-like
    258258object. Subclasses should override this.
    259259
    260 .. method:: writeString(encoding)
     260.. method:: SyndicationFeed.writeString(encoding)
    261261
    262262Returns the feed in the given encoding as a string.
    263263
    264 .. method:: latest_post_date()
     264.. method:: SyndicationFeed.latest_post_date()
    265265
    266266Returns the latest item's ``pubdate``. If none of them have a ``pubdate``,
    267267this returns the current date/time.
Back to Top