Ticket #14784: files-doc-fixes.diff

File files-doc-fixes.diff, 2.1 KB (added by Adam Vandenberg, 13 years ago)
  • docs/topics/files.txt

    diff --git a/docs/topics/files.txt b/docs/topics/files.txt
    index 26114cb..619f7d3 100644
    a b When you use a :class:`~django.db.models.FileField` or  
    2323:class:`~django.db.models.ImageField`, Django provides a set of APIs you can use
    2424to deal with that file.
    2525
    26 Consider the following model, using an ``ImageField`` to store a photo::
     26Consider the following model, using an :class:`~django.db.models.ImageField` to
     27store a photo::
    2728
    2829    class Car(models.Model):
    2930        name = models.CharField(max_length=255)
    Argument Description  
    123124======================  ===================================================
    124125``location``            Optional. Absolute path to the directory that will
    125126                        hold the files. If omitted, it will be set to the
    126                         value of your ``MEDIA_ROOT`` setting.
     127                        value of your :setting:`MEDIA_ROOT` setting.
    127128``base_url``            Optional. URL that serves the files stored at this
    128129                        location. If omitted, it will default to the value
    129                         of your ``MEDIA_URL`` setting.
     130                        of your :setting:`MEDIA_URL` setting.
    130131======================  ===================================================
    131132
    132133For example, the following code will store uploaded files under
    133 ``/media/photos`` regardless of what your ``MEDIA_ROOT`` setting is::
     134``/media/photos`` regardless of what your :setting:`MEDIA_ROOT` setting is::
    134135
    135136    from django.db import models
    136137    from django.core.files.storage import FileSystemStorage
    For example, the following code will store uploaded files under  
    141142        ...
    142143        photo = models.ImageField(storage=fs)
    143144
    144 :doc:`Custom storage systems </howto/custom-file-storage>` work the same way: you
    145 can pass them in as the ``storage`` argument to a ``FileField``.
     145:doc:`Custom storage systems </howto/custom-file-storage>` work the same way:
     146you can pass them in as the ``storage`` argument to a
     147:class:`~django.db.models.FileField`.
Back to Top