Commit 6e853a9a authored by Seb's avatar Seb
Browse files

update readme

parent 09dec6ec
...@@ -35,12 +35,11 @@ Implement as a ``ForeignKey`` relation, same as wagtailimages. ...@@ -35,12 +35,11 @@ Implement as a ``ForeignKey`` relation, same as wagtailimages.
.. code:: python .. code:: python
from django.db import models from django.db import models
from wagtail.wagtailadmin.edit_handlers import FieldPanel from wagtail.admin.edit_handlers import FieldPanel
from wagtail.wagtailcore.fields import RichTextField from wagtail.core.fields import RichTextField
from wagtail.wagtailcore.models import Page from wagtail.core.models import Page
from wagtailvideos.edit_handlers import VideoChooserPanel from wagtailvideos.edit_handlers import VideoChooserPanel
...@@ -56,6 +55,28 @@ Implement as a ``ForeignKey`` relation, same as wagtailimages. ...@@ -56,6 +55,28 @@ Implement as a ``ForeignKey`` relation, same as wagtailimages.
VideoChooserPanel('header_video'), VideoChooserPanel('header_video'),
] ]
In a Streamfield:
~~~~~~~~~~~~~~~~~
A VideoChooserBlock is included
.. code:: python
from wagtail.admin.edit_handlers import StreamFieldPanel
from wagtail.core.fields import StreamField
from wagtail.core.models import Page
from wagtailvideos.blocks import VideoChooserBlock
class ContentPage(Page):
body = StreamField([
('video', VideoChooserBlock()),
])
content_panels = Page.content_panels + [
StreamFieldPanel('body'),
]
In template: In template:
~~~~~~~~~~~~ ~~~~~~~~~~~~
...@@ -82,6 +103,4 @@ Future features ...@@ -82,6 +103,4 @@ Future features
--------------- ---------------
- Richtext embed - Richtext embed
- Streamfield block
- Transcoding via amazon service rather than ffmpeg - Transcoding via amazon service rather than ffmpeg
- Wagtail homescreen video count
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment