Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Websites UFRPE
Wagtail Videos
Commits
6e853a9a
Commit
6e853a9a
authored
Jan 25, 2021
by
Seb
Browse files
update readme
parent
09dec6ec
Changes
1
Hide whitespace changes
Inline
Side-by-side
README.rst
View file @
6e853a9a
...
...
@@ -35,12 +35,11 @@ Implement as a ``ForeignKey`` relation, same as wagtailimages.
.. code:: python
from django.db import models
from wagtail.
wagtail
admin.edit_handlers import FieldPanel
from wagtail.
wagtail
core.fields import RichTextField
from wagtail.
wagtail
core.models import Page
from wagtail.admin.edit_handlers import FieldPanel
from wagtail.core.fields import RichTextField
from wagtail.core.models import Page
from wagtailvideos.edit_handlers import VideoChooserPanel
...
...
@@ -56,6 +55,28 @@ Implement as a ``ForeignKey`` relation, same as wagtailimages.
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:
~~~~~~~~~~~~
...
...
@@ -82,6 +103,4 @@ Future features
---------------
- Richtext embed
- Streamfield block
- Transcoding via amazon service rather than ffmpeg
- Wagtail homescreen video count
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment