Skip to content
This repository was archived by the owner on Apr 15, 2025. It is now read-only.

Commit 56eb85b

Browse files
authored
Merge pull request #1 from mitodl/mb/django10
Upgraded the app to be compatible with Django 1.10+
2 parents 98450c2 + bcc10d4 commit 56eb85b

File tree

16 files changed

+39
-101
lines changed

16 files changed

+39
-101
lines changed

.travis.yml

Lines changed: 7 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -2,28 +2,17 @@ language: python
22

33
python:
44
- "2.7"
5+
- "3.6"
56

67
env:
78
matrix:
8-
- TOX_ENV=py27-dj14
9-
- TOX_ENV=py27-dj15
10-
- TOX_ENV=py27-dj16
11-
- TOX_ENV=py27-dj17
129
- TOX_ENV=py27-dj18
13-
- TOX_ENV=py33-dj15
14-
- TOX_ENV=py33-dj16
15-
- TOX_ENV=py33-dj17
16-
- TOX_ENV=py33-dj18
17-
- TOX_ENV=py34-dj15
18-
- TOX_ENV=py34-dj16
19-
- TOX_ENV=py34-dj17
20-
- TOX_ENV=py34-dj18
21-
- TOX_ENV=pypy-dj14
22-
- TOX_ENV=pypy-dj15
23-
- TOX_ENV=pypy-dj16
24-
- TOX_ENV=pypy-dj17
25-
- TOX_ENV=pypy-dj18
26-
- TOX_ENV=py27-cov
10+
- TOX_ENV=py27-dj19
11+
- TOX_ENV=py27-dj100
12+
- TOX_ENV=py36-dj18
13+
- TOX_ENV=py36-dj19
14+
- TOX_ENV=py36-dj100
15+
- TOX_ENV=py36-cov
2716

2817
install:
2918
- pip install tox

README.rst

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -136,3 +136,10 @@ This package provide various signals for you to get notification, and do more th
136136
:target: https://travis-ci.org/StreetVoice/django-elastic-transcoder
137137
.. |Coverage Status| image:: https://coveralls.io/repos/StreetVoice/django-elastic-transcoder/badge.png?branch=master
138138
:target: https://coveralls.io/r/StreetVoice/django-elastic-transcoder?branch=master
139+
140+
Run Tests
141+
-----------
142+
143+
.. code:: sh
144+
$ pip install -r test_requirements.txt
145+
$ tox

dj_elastictranscoder/admin.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
from django.contrib import admin
2-
from .models import EncodeJob
2+
from dj_elastictranscoder.models import EncodeJob
33

44
class EncodeJobAdmin(admin.ModelAdmin):
55
list_display = ('id', 'state', 'message')

dj_elastictranscoder/migrations/0001_initial.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ class Migration(migrations.Migration):
1616
fields=[
1717
('id', models.CharField(max_length=100, serialize=False, primary_key=True)),
1818
('object_id', models.PositiveIntegerField()),
19-
('state', models.PositiveIntegerField(default=0, db_index=True, choices=[(0, b'Submitted'), (1, b'Progressing'), (2, b'Error'), (3, b'Warning'), (4, b'Complete')])),
19+
('state', models.PositiveIntegerField(choices=[(0, 'Submitted'), (1, 'Progressing'), (2, 'Error'), (3, 'Warning'), (4, 'Complete')], db_index=True, default=0)),
2020
('message', models.TextField()),
2121
('created_at', models.DateTimeField(auto_now_add=True)),
2222
('last_modified', models.DateTimeField(auto_now=True)),

dj_elastictranscoder/models.py

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,7 @@
11
from django.db import models
22
from django.contrib.contenttypes.models import ContentType
3-
import django
4-
if django.get_version() >= '1.8':
5-
from django.contrib.contenttypes.fields import GenericForeignKey
6-
else:
7-
from django.contrib.contenttypes.generic import GenericForeignKey
3+
from django.contrib.contenttypes.fields import GenericForeignKey
4+
85

96

107
class EncodeJob(models.Model):

dj_elastictranscoder/south_migrations/0001_initial.py

Lines changed: 0 additions & 49 deletions
This file was deleted.

dj_elastictranscoder/south_migrations/__init__.py

Whitespace-only changes.

dj_elastictranscoder/transcoder.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
from django.conf import settings
44
from django.contrib.contenttypes.models import ContentType
55

6-
from .models import EncodeJob
6+
from dj_elastictranscoder.models import EncodeJob
77

88

99
class Transcoder(object):

dj_elastictranscoder/urls.py

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
1-
try:
2-
from django.conf.urls import url, patterns
3-
except ImportError:
4-
from django.conf.urls.defaults import url, patterns # Support for Django < 1.4
1+
from django.conf.urls import url
2+
3+
from dj_elastictranscoder.views import endpoint as transcoder_endpoint
4+
5+
urlpatterns = (url(r'^endpoint/$', transcoder_endpoint, name='transcoder_endpoint'),)
56

6-
urlpatterns = patterns('dj_elastictranscoder.views',
7-
url(r'^endpoint/$', 'endpoint'),
8-
)

dj_elastictranscoder/views.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44
from django.views.decorators.csrf import csrf_exempt
55
from django.core.mail import mail_admins
66

7-
from .models import EncodeJob
8-
from .signals import (
7+
from dj_elastictranscoder.models import EncodeJob
8+
from dj_elastictranscoder.signals import (
99
transcode_onprogress,
1010
transcode_onerror,
1111
transcode_oncomplete

0 commit comments

Comments
 (0)