Changeset 822
- Timestamp:
- 10/10/05 09:00:20 (3 years ago)
- Files:
-
- django/trunk/docs/model-api.txt (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
django/trunk/docs/model-api.txt
r742 r822 249 249 250 250 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 253 253 steps: 254 254 255 255 1. In your settings file, you'll need to define ``MEDIA_ROOT``as the 256 256 full path to a directory where you'd like Django to store uploaded … … 259 259 sure that this directory is writable by the Web server's user 260 260 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 263 263 to define the ``upload_to`` option to tell Django to which 264 264 subdirectory of ``MEDIA_ROOT`` it should upload files. … … 270 270 the absolute URL to your image in a template with ``{{ 271 271 object.get_mug_shot_url }}``. 272 272 273 273 .. _`strftime formatting`: http://docs.python.org/lib/module-time.html#l2h-1941 274 274 … … 303 303 304 304 Requires the `Python Imaging Library`_. 305 305 306 306 .. _Python Imaging Library: http://www.pythonware.com/products/pil/ 307 307 … … 722 722 723 723 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). 725 727 726 728 ``verbose_name``
