Django

Code

Changeset 822

Show
Ignore:
Timestamp:
10/10/05 09:00:20 (3 years ago)
Author:
adrian
Message:

Fixed #601 -- Updated docs/model-api.txt unique_together section to say it's enforced at the database level.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • django/trunk/docs/model-api.txt

    r742 r822  
    249249 
    250250    The admin represents this as an ``<input type="file">`` (a file-upload widget). 
    251      
    252     Using a `FieldField` or an ``ImageField`` (see below) in a model takes a few  
     251 
     252    Using a `FieldField` or an ``ImageField`` (see below) in a model takes a few 
    253253    steps: 
    254      
     254 
    255255        1. In your settings file, you'll need to define ``MEDIA_ROOT``as the 
    256256           full path to a directory where you'd like Django to store uploaded 
     
    259259           sure that this directory is writable by the Web server's user 
    260260           account. 
    261          
    262         2. Add the ``FileField`` or ``ImageField`` to your model, making sure  
     261 
     262        2. Add the ``FileField`` or ``ImageField`` to your model, making sure 
    263263           to define the ``upload_to`` option to tell Django to which 
    264264           subdirectory of ``MEDIA_ROOT`` it should upload files. 
     
    270270           the absolute URL to your image in a template with ``{{ 
    271271           object.get_mug_shot_url }}``. 
    272      
     272 
    273273    .. _`strftime formatting`: http://docs.python.org/lib/module-time.html#l2h-1941 
    274274 
     
    303303 
    304304    Requires the `Python Imaging Library`_. 
    305      
     305 
    306306    .. _Python Imaging Library: http://www.pythonware.com/products/pil/ 
    307307 
     
    722722 
    723723    This is a list of lists of fields that must be unique when considered 
    724     together. It's used in the Django admin. 
     724    together. It's used in the Django admin and is enforced at the database 
     725    level (i.e., the appropriate ``UNIQUE`` statements are included in the 
     726    ``CREATE TABLE`` statement). 
    725727 
    726728``verbose_name``