Skip to content

Commit

Permalink
Merge pull request #22 from escaped/feat-remove-deprecation-warnings
Browse files Browse the repository at this point in the history
feat: remove deprecation warnings
  • Loading branch information
escaped committed Oct 20, 2020
2 parents 1b44131 + 7565dfb commit 538ff4e
Show file tree
Hide file tree
Showing 7 changed files with 15 additions and 9 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

### Changed

* remove deprecation warnings

### Removed

* dropped support for python `2.7` and `3.5`
Expand Down
2 changes: 1 addition & 1 deletion test_proj/manage.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import sys

if __name__ == "__main__":
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "settings")
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "test_proj.settings")
sys.path.append(os.pardir)

from django.core.management import execute_from_command_line
Expand Down
6 changes: 3 additions & 3 deletions test_proj/urls.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
from django.conf.urls import url
from django.conf.urls import re_path
from django.contrib import admin

from .media_library.views import VideoFormView

urlpatterns = [
url(r'^admin/', admin.site.urls),
url(r'^', VideoFormView.as_view()),
re_path(r'^admin/', admin.site.urls),
re_path(r'^$', VideoFormView.as_view()),
]
2 changes: 1 addition & 1 deletion video_encoding/admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ class FormatInline(admin.GenericTabularInline):
extra = 0
max_num = 0

def has_add_permission(self, *args):
def has_add_permission(self, *args, **kwargs):
return False

def has_delete_permission(self, *args, **kwargs):
Expand Down
6 changes: 4 additions & 2 deletions video_encoding/backends/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
from django.utils.module_loading import import_string
from django.utils.translation import ugettext_lazy as _

from ..config import settings


def get_backend_class():
from ..config import settings

try:
cls = import_string(settings.VIDEO_ENCODING_BACKEND)
except ImportError as e:
Expand All @@ -18,5 +18,7 @@ def get_backend_class():


def get_backend():
from ..config import settings

cls = get_backend_class()
return cls(**settings.VIDEO_ENCODING_BACKEND_PARAMS)
2 changes: 1 addition & 1 deletion video_encoding/fields.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
from django.db.models.fields.files import FieldFile, ImageField, ImageFileDescriptor
from django.utils.translation import ugettext as _
from django.utils.translation import gettext as _

from .backends import get_backend_class
from .files import VideoFile
Expand Down
2 changes: 1 addition & 1 deletion video_encoding/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
from django.contrib.contenttypes.fields import GenericForeignKey
from django.contrib.contenttypes.models import ContentType
from django.db import models
from django.utils.translation import ugettext_lazy as _
from django.utils.translation import gettext_lazy as _

from .fields import VideoField
from .manager import FormatManager
Expand Down

0 comments on commit 538ff4e

Please sign in to comment.