Skip to content

Commit

Permalink
Merge 77709b9 into 3055599
Browse files Browse the repository at this point in the history
  • Loading branch information
khasanovbi committed Feb 25, 2017
2 parents 3055599 + 77709b9 commit e37cd70
Show file tree
Hide file tree
Showing 11 changed files with 25 additions and 23 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -89,4 +89,4 @@ ENV/
# Rope project settings
.ropeproject

.idea
.idea
5 changes: 5 additions & 0 deletions .isort.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
[settings]
line_length=100
multi_line_output = 5
known_third_party = rest_framework, six, ujson
not_skip = __init__.py
13 changes: 5 additions & 8 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,21 +5,18 @@ python:
- 3.4
- 3.5
env:
- DJANGO=Django==1.8.15
- DJANGO=Django==1.9.10
- DJANGO=Django==1.10.2
branches:
only:
- master
- DJANGO_VERSION=1.8.17
- DJANGO_VERSION=1.9.12
- DJANGO_VERSION=1.10.5
install:
- pip install -U pip wheel setuptools
- python setup.py install
- pip install DJANGO python-coveralls
- pip install Django==$DJANGO_VERSION python-coveralls
script:
- coverage run --source=rest_channels runtests.py
- coverage report
addons:
apt_packages:
- pandoc
after_success:
- coveralls
- coveralls
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,4 @@ manually:

The BSD License

Contributed by `Bulat Khasanov`
Contributed by `Bulat Khasanov`
2 changes: 1 addition & 1 deletion docs/guide/view.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,4 +62,4 @@ For example:


class SocketCompositionVersionSerializer(SocketResponseSerializer):
data = CompositionVersionSerializer(required_fields=('tracks',))
data = CompositionVersionSerializer(required_fields=('tracks',))
5 changes: 3 additions & 2 deletions rest_channels/settings.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
# coding=utf-8
from __future__ import unicode_literals

from importlib import import_module

from django.conf import settings
from django.test.signals import setting_changed
from django.utils import six
from rest_framework.compat import importlib

DEFAULTS = {
# Base API policies
Expand Down Expand Up @@ -50,7 +51,7 @@ def import_from_string(val, setting_name):
# Nod to tastypie's use of importlib.
parts = val.split('.')
module_path, class_name = '.'.join(parts[:-1]), parts[-1]
module = importlib.import_module(module_path)
module = import_module(module_path)
return getattr(module, class_name)
except (ImportError, AttributeError) as e:
msg = ("Could not import '%s' for API setting '%s'. %s: %s." %
Expand Down
3 changes: 2 additions & 1 deletion rest_channels/socket_request.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
from __future__ import unicode_literals

import six
import sys

import six


class Empty(object):
"""
Expand Down
3 changes: 1 addition & 2 deletions rest_channels/socket_routing/route_views.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

from channels.sessions import channel_session
from django.utils.decorators import method_decorator
from rest_channels.socket_routing.serializers import RouteSerializer, RouteResponseSerializer
from rest_channels.socket_routing.serializers import RouteResponseSerializer, RouteSerializer
from rest_channels.views import WebSocketView
from rest_framework import status as rest_framework_status

Expand Down Expand Up @@ -50,4 +50,3 @@ def handle_exception(self, exc):
data=response_data,
status=status_code
)

9 changes: 4 additions & 5 deletions rest_channels/views.py
Original file line number Diff line number Diff line change
@@ -1,16 +1,15 @@
# coding=utf-8
from __future__ import unicode_literals

import six
from django.db import models
from functools import update_wrapper
from rest_framework import exceptions
from rest_framework import status
from rest_framework.compat import set_rollback

import six
from django.db import models
from rest_channels import exceptions as rest_exceptions
from rest_channels.settings import rest_channels_settings
from rest_channels.socket_request import ContentType, SocketRequest
from rest_framework import exceptions, status
from rest_framework.compat import set_rollback


def exception_handler(exc, context):
Expand Down
2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
[bdist_wheel]
universal = 1
universal = 1
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import os

import re

from setuptools import find_packages, setup


Expand Down

0 comments on commit e37cd70

Please sign in to comment.