mirror of
https://github.com/Hopiu/django-imagekit.git
synced 2026-03-16 21:30:23 +00:00
Merge pull request #428 from adamchainz/patch-1
README - use Python 3 print function
This commit is contained in:
commit
364cd49278
1 changed files with 4 additions and 4 deletions
|
|
@ -70,8 +70,8 @@ your model class:
|
|||
options={'quality': 60})
|
||||
|
||||
profile = Profile.objects.all()[0]
|
||||
print profile.avatar_thumbnail.url # > /media/CACHE/images/982d5af84cddddfd0fbf70892b4431e4.jpg
|
||||
print profile.avatar_thumbnail.width # > 100
|
||||
print(profile.avatar_thumbnail.url) # > /media/CACHE/images/982d5af84cddddfd0fbf70892b4431e4.jpg
|
||||
print(profile.avatar_thumbnail.width) # > 100
|
||||
|
||||
As you can probably tell, ImageSpecFields work a lot like Django's
|
||||
ImageFields. The difference is that they're automatically generated by
|
||||
|
|
@ -97,8 +97,8 @@ class:
|
|||
options={'quality': 60})
|
||||
|
||||
profile = Profile.objects.all()[0]
|
||||
print profile.avatar_thumbnail.url # > /media/avatars/MY-avatar.jpg
|
||||
print profile.avatar_thumbnail.width # > 100
|
||||
print(profile.avatar_thumbnail.url) # > /media/avatars/MY-avatar.jpg
|
||||
print(profile.avatar_thumbnail.width) # > 100
|
||||
|
||||
This is pretty similar to our previous example. We don't need to specify a
|
||||
"source" any more since we're not processing another image field, but we do need
|
||||
|
|
|
|||
Loading…
Reference in a new issue