mirror of
https://github.com/django/django.git
synced 2025-07-18 18:55:18 +00:00
Fixed assorted flake8 errors.
This commit is contained in:
parent
695bc0d191
commit
b67ab75e82
38 changed files with 92 additions and 73 deletions
|
@ -142,11 +142,14 @@ class FileDescriptor(object):
|
|||
The descriptor for the file attribute on the model instance. Returns a
|
||||
FieldFile when accessed so you can do stuff like::
|
||||
|
||||
>>> from myapp.models import MyModel
|
||||
>>> instance = MyModel.objects.get(pk=1)
|
||||
>>> instance.file.size
|
||||
|
||||
Assigns a file object on assignment so you can do::
|
||||
|
||||
>>> instance.file = File(...)
|
||||
>>> with open('/tmp/hello.world', 'r') as f:
|
||||
... instance.file = File(f)
|
||||
|
||||
"""
|
||||
def __init__(self, field):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue