diff options
| author | Christopher Long <indirecthit@gmail.com> | 2006-08-14 18:52:03 +0000 |
|---|---|---|
| committer | Christopher Long <indirecthit@gmail.com> | 2006-08-14 18:52:03 +0000 |
| commit | 4cfd3203a67cd6e1fccccab5c85da5551814d2ee (patch) | |
| tree | 0b8ed10b392cdf17b218aab3a0856f2ba58160ad /docs/model-api.txt | |
| parent | 4f0118995c43fd3cb5f79ffcbaf10b1115d8e434 (diff) | |
[per-object-permissions] Merged to revision 3582
git-svn-id: http://code.djangoproject.com/svn/django/branches/per-object-permissions@3583 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'docs/model-api.txt')
| -rw-r--r-- | docs/model-api.txt | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/docs/model-api.txt b/docs/model-api.txt index c369508c65..502ceaf7ff 100644 --- a/docs/model-api.txt +++ b/docs/model-api.txt @@ -223,6 +223,13 @@ steps: the absolute URL to your image in a template with ``{{ object.get_mug_shot_url }}``. +For example, say your ``MEDIA_ROOT`` is set to ``'/home/media'``, and +``upload_to`` is set to ``'photos/%Y/%m/%d'``. The ``'%Y/%m/%d'`` part of +``upload_to`` is strftime formatting; ``'%Y'`` is the four-digit year, +``'%m'`` is the two-digit month and ``'%d'`` is the two-digit day. If you +upload a file on Jan. 15, 2007, it will be saved in the directory +``/home/media/photos/2007/01/15``. + .. _`strftime formatting`: http://docs.python.org/lib/module-time.html#l2h-1941 ``FilePathField`` |
