Skip to content
This repository has been archived by the owner on Jun 10, 2024. It is now read-only.

Replace __latest__ dependencies with specific version. #14

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion djangocms_youtube/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = '0.2.1'
__version__ = '0.4.0'
9 changes: 6 additions & 3 deletions djangocms_youtube/migrations/0001_initial.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,18 @@
class Migration(migrations.Migration):

dependencies = [
('filer', '__latest__'),
('cms', '__latest__'),
('filer', '0006_auto_20160623_1627'),
('cms', '0014_auto_20160404_1908'),
]

operations = [
migrations.CreateModel(
name='Youtube',
fields=[
('cmsplugin_ptr', models.OneToOneField(parent_link=True, auto_created=True, primary_key=True, serialize=False, to='cms.CMSPlugin')),
('cmsplugin_ptr', models.OneToOneField(parent_link=True,
auto_created=True, primary_key=True, serialize=False,
to='cms.CMSPlugin',
on_delete=django.db.models.deletion.CASCADE)),
('title', models.CharField(max_length=150, verbose_name='Title', blank=True)),
('video_url', models.URLField(help_text='Paste the URL of the YouTube video', verbose_name='Video URL')),
('width', models.PositiveIntegerField(help_text='Sets the width of your player, used on some templates where applicable', null=True, verbose_name='Width', blank=True)),
Expand Down
7 changes: 3 additions & 4 deletions djangocms_youtube/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,7 @@

from django.contrib.sites.models import Site
from django.db import models
from django.utils import six
from django.utils.encoding import python_2_unicode_compatible
from six import python_2_unicode_compatible, iteritems as six_iteritems
from django.utils.translation import ugettext_lazy as _

from cms.models import CMSPlugin
Expand Down Expand Up @@ -78,7 +77,7 @@ def video(self):

def _generate_thumbnails(self):
_thumbnails = {}
for name, opts in six.iteritems(settings.DJANGOCMS_YOUTUBE_THUMBNAIL_SIZES):
for name, opts in six_iteritems(settings.DJANGOCMS_YOUTUBE_THUMBNAIL_SIZES):
try:
thumb_opts = {
'size': (int(opts['width']), int(opts['height'])),
Expand Down Expand Up @@ -135,7 +134,7 @@ def get_thumbnail(self):
class Video(object):

def __init__(self, *args, **kwargs):
for key, value in six.iteritems(kwargs):
for key, value in six_iteritems(kwargs):
setattr(self, key, value)

def get_id(self):
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
(function($) {
$(function() {
window.addEventListener("load", function() {
(function($) {

var heightInput = $('input[name="height"]');
var widthInput = $('input[name="width"]');
Expand Down Expand Up @@ -65,5 +65,5 @@
}
})

});
})(django.jQuery);
})(django.jQuery);
});
2 changes: 1 addition & 1 deletion djangocms_youtube/templates/djangocms_youtube/default.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{% load thumbnail staticfiles sekizai_tags cms_tags %}
{% load thumbnail static sekizai_tags cms_tags %}
<div class="video-wrapper js-video-wrapper" itemprop="video" itemscope itemtype="http://schema.org/VideoObject" data-video-id="{{ instance.video.get_id }}" data-video-title="{{ instance.title }}">
<meta itemprop="name" content="{{ instance.get_title }}" />
<meta itemprop="duration" content="{{ instance.video.get_duration }}" />
Expand Down
4 changes: 2 additions & 2 deletions djangocms_youtube/widgets.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@
from __future__ import unicode_literals

from django import forms
from django.core.urlresolvers import reverse
from django.urls import reverse

from .models import Youtube


class YoutubeVideoURLWidget(forms.TextInput):
model = Youtube

def render(self, name, value, attrs=None):
def render(self, name, value, attrs=None, renderer=None):
if attrs is None:
attrs = {}

Expand Down
9 changes: 4 additions & 5 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
long_description=readme,
author='Mishbah Razzaque',
author_email='[email protected]',
url='https://github.com/mishbahr/djangocms-youtube',
url='https://github.com/ketaro/djangocms-youtube',
packages=[
'djangocms_youtube',
],
Expand All @@ -42,20 +42,19 @@
'isodate>=0.5.4',
'jsonfield',
'requests',
'six',
],
license="BSD",
zip_safe=False,
keywords='djangocms-youtube, YouTube, django-cms, cmsplugin-youtube',
classifiers=[
'Development Status :: 4 - Beta',
'Framework :: Django',
'Framework :: Django :: 1.6',
'Framework :: Django :: 1.7',
'Framework :: Django :: 1.8',
'Framework :: Django :: 3.0',
'Framework :: Django :: 3.1',
'Intended Audience :: Developers',
'License :: OSI Approved :: BSD License',
'Natural Language :: English',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.3',
],
Expand Down