Skip to content

Commit cedcf10

Browse files
committed
Update documentation
1 parent 76726af commit cedcf10

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

README.rst

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,9 @@ Create a model and add a field of type ValidatedFileField. You can add a maximum
1818
and a list of valid mime types that will be allowed. The list of all mime types is available
1919
here: http://www.iana.org/assignments/media-types/index.html::
2020

21+
from django.db import models
22+
from validatedfile.models import ValidatedFileField
23+
2124
class TestModel(models.Model):
2225
the_file = ValidatedFileField(
2326
null = True,
@@ -44,6 +47,6 @@ it depends on the software you are using. For example, if you use apache, you sh
4447

4548
This is a complementary measure, because you'll usually want normal users that exceed the size by a
4649
reasonable amount to get a friendly form validation message, while attacking users will see how their
47-
connection is abruptly cut before the file finishes uploading. So the recommended setting is to have
50+
connection is abruptly cut before the file finishes uploading. So the recommended setting is to give
4851
max_upload_size a small value (e.g. 5Mb) and LimitRequestBody a higher one (e.g. 100Mb).
4952

0 commit comments

Comments
 (0)