django-embed-video error Unresolved tag 'video'

119 views
Skip to first unread message

Xristos Xristoou

unread,
Jan 15, 2016, 1:25:14 PM1/15/16
to Django users

i want to create a video from youtube url in the django using embed-video
1.step install embed-video

pip install django-embed-video
  1. step

Add embed_video to INSTALLED_APPS in your Django settings.

TEMPLATE_CONTEXT_PROCESSORS = (
...
'django.core.context_processors.request',
)

3.step my model.py

from django.db import models
from embed_video.fields import EmbedVideoField

class Item(models.Model):
    video = EmbedVideoField()  # same like models.URLField()

4.step admin .py

class MyModelAdmin(AdminVideoMixin, admin.ModelAdmin):
    pass

admin.site.register(MyModelAdmin)

5.step html tags

{% load embed_video_tags %}
the video tag:
{% video item.video as my_video %}
  URL: {{ my_video.url }}
  Thumbnail: {{ my_video.thumbnail }}
  Backend: {{ my_video.backend }}

  {% video my_video "large" %}
{% endvideo %}

in the 5 step show me error Unresolved tag 'video'

why have error ? i follow the docs embed-video

Luis Zárate

unread,
Jan 15, 2016, 2:30:32 PM1/15/16
to django...@googlegroups.com
Are you using django 1.9 ?

TEMPLATE_CONTEXT_PROCESSORS changed in 1.9

I saw the app and it have video tag so test again and check that you do all steps in the doc.
> --
> You received this message because you are subscribed to the Google Groups "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to django-users...@googlegroups.com.
> To post to this group, send email to django...@googlegroups.com.
> Visit this group at https://groups.google.com/group/django-users.
> To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/61be42eb-e98a-407c-82ba-6414d8517a7f%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

--
"La utopía sirve para caminar" Fernando Birri



Luis Zárate

unread,
Jan 15, 2016, 2:45:28 PM1/15/16
to django...@googlegroups.com
Are you using django 1.9 ?

TEMPLATE_CONTEXT_PROCESSORS changed in 1.9

I saw the app and it have video tag so test again and check that you do all steps in the doc.

El viernes, 15 de enero de 2016, Xristos Xristoou <sax...@gmail.com> escribió:
>

Xristos Xristoou

unread,
Jan 15, 2016, 2:58:34 PM1/15/16
to Django users
yeah i thing so using django 1.9 help me pls

Luis Zárate

unread,
Jan 15, 2016, 3:14:57 PM1/15/16
to django...@googlegroups.com

I thing the problem its here


 {% video my_video "large" %}

You have a tag inside the other tag


The reference

https://docs.djangoproject.com/en/1.9/ref/settings/#templates



El viernes, 15 de enero de 2016, Xristos Xristoou <sax...@gmail.com> escribió:
> --
> You received this message because you are subscribed to the Google Groups "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to django-users...@googlegroups.com.
> To post to this group, send email to django...@googlegroups.com.
> Visit this group at https://groups.google.com/group/django-users.
> To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/44ecce45-b2fe-4fd6-bb6c-a0d8eb20ee1a%40googlegroups.com.

Xristos Xristoou

unread,
Jan 15, 2016, 4:58:37 PM1/15/16
to Django users
now if i  delete  {% video my_video "large" %} not show me error again but nor show me and video is empty for my template .
and again show me this ....

django 1.8.7 finaly that my version.

Reply all
Reply to author
Forward
Message has been deleted
0 new messages