mirror of
https://github.com/Hopiu/django-imagekit.git
synced 2026-03-16 21:30:23 +00:00
Code block fail. :(
This commit is contained in:
parent
365bbf3496
commit
26563dd601
1 changed files with 10 additions and 0 deletions
10
README.rst
10
README.rst
|
|
@ -15,6 +15,8 @@ Step 2
|
|||
|
||||
Add ImageKit to your models.
|
||||
|
||||
::
|
||||
|
||||
# myapp/models.py
|
||||
|
||||
from django.db import models
|
||||
|
|
@ -37,6 +39,8 @@ Step 3
|
|||
|
||||
Create your specifications.
|
||||
|
||||
::
|
||||
|
||||
# myapp/specs.py
|
||||
|
||||
from imagekit.specs import ImageSpec
|
||||
|
|
@ -80,6 +84,8 @@ Step 5
|
|||
|
||||
Use your new model in templates.
|
||||
|
||||
::
|
||||
|
||||
<div class="original">
|
||||
<img src="{{ photo.original_image.url }}" alt="{{ photo.name }}">
|
||||
</div>
|
||||
|
|
@ -99,6 +105,8 @@ Step 6
|
|||
|
||||
Play with the API.
|
||||
|
||||
::
|
||||
|
||||
>>> from myapp.models import Photo
|
||||
>>> p = Photo.objects.all()[0]
|
||||
<Photo: MyPhoto>
|
||||
|
|
@ -120,6 +128,8 @@ Step 7
|
|||
|
||||
Enjoy a nice beverage.
|
||||
|
||||
::
|
||||
|
||||
from refrigerator import beer
|
||||
|
||||
beer.enjoy()
|
||||
|
|
|
|||
Loading…
Reference in a new issue