Browse files

Fixed #10076 -- Documented invalid arguments for `FileField`, based o…

…n patch from timo.

git-svn-id: bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
1 parent 27314a8 commit 78cbc3acfa6d8ccbb8414ac04e477922822c8e50 @gdub gdub committed Mar 30, 2009
Showing with 9 additions and 2 deletions.
  1. +9 −2 docs/ref/models/fields.txt
@@ -239,7 +239,8 @@ you try to save a model with a duplicate value in a :attr:`~Field.unique`
field, a :exc:`django.db.IntegrityError` will be raised by the model's
:meth:`` method.
-This option is valid on all field types except :class:`ManyToManyField`.
+This option is valid on all field types except :class:`ManyToManyField` and
@@ -437,7 +438,13 @@ A :class:`CharField` that checks that the value is a valid e-mail address.
.. class:: FileField(upload_to=None, [max_length=100, **options])
-A file-upload field. Has one **required** argument:
+A file-upload field.
+.. note::
+ The ``primary_key`` and ``unique`` arguments are not supported, and will
+ raise a ``TypeError`` if used.
+Has one **required** argument:
.. attribute:: FileField.upload_to

0 comments on commit 78cbc3a

Please sign in to comment.