diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 33f42ad..0000000 --- a/.travis.yml +++ /dev/null @@ -1,26 +0,0 @@ -language: python -python: - - "2.7" - - "3.5" - - "3.6" -env: - - DJANGO=1.11.* DRF=3.7.* - - DJANGO=1.11.* DRF=3.8.* - - DJANGO=2.0.* DRF=3.7.* - - DJANGO=2.0.* DRF=3.8.* -install: - - pip install -q Django==$DJANGO djangorestframework==$DRF - - pip install coveralls - - pip install -r dj_rest_auth/tests/requirements.pip -script: - - coverage run --source=dj_rest_auth setup.py test -after_success: - - coveralls -before_script: - - flake8 . --config=flake8 -matrix: - exclude: - - python: "2.7" - env: DJANGO=2.0.* DRF=3.7.* - - python: "2.7" - env: DJANGO=2.0.* DRF=3.8.* diff --git a/dj_rest_auth/registration/views.py b/dj_rest_auth/registration/views.py index 0e0ab0d..f8d1120 100644 --- a/dj_rest_auth/registration/views.py +++ b/dj_rest_auth/registration/views.py @@ -19,16 +19,16 @@ from allauth.socialaccount import signals from allauth.socialaccount.adapter import get_adapter as get_social_adapter from allauth.socialaccount.models import SocialAccount -from rest_auth.app_settings import (TokenSerializer, +from dj_rest_auth.app_settings import (TokenSerializer, JWTSerializer, create_token) -from rest_auth.models import TokenModel -from rest_auth.registration.serializers import (VerifyEmailSerializer, +from dj_rest_auth.models import TokenModel +from dj_rest_auth.registration.serializers import (VerifyEmailSerializer, SocialLoginSerializer, SocialAccountSerializer, SocialConnectSerializer) -from rest_auth.utils import jwt_encode -from rest_auth.views import LoginView +from dj_rest_auth.utils import jwt_encode +from dj_rest_auth.views import LoginView from .app_settings import RegisterSerializer, register_permission_classes sensitive_post_parameters_m = method_decorator( diff --git a/dj_rest_auth/tests/settings.py b/dj_rest_auth/tests/settings.py index 16ba4b5..c86bfc1 100644 --- a/dj_rest_auth/tests/settings.py +++ b/dj_rest_auth/tests/settings.py @@ -90,8 +90,8 @@ INSTALLED_APPS = [ 'rest_framework', 'rest_framework.authtoken', - 'rest_auth', - 'rest_auth.registration', + 'dj_rest_auth', + 'dj_rest_auth.registration', 'rest_framework_jwt' ] diff --git a/dj_rest_auth/tests/test_api.py b/dj_rest_auth/tests/test_api.py index 9c5fd9e..b6d84f2 100644 --- a/dj_rest_auth/tests/test_api.py +++ b/dj_rest_auth/tests/test_api.py @@ -8,8 +8,8 @@ from allauth.account import app_settings as account_app_settings from rest_framework import status from rest_framework.test import APIRequestFactory -from rest_auth.registration.views import RegisterView -from rest_auth.registration.app_settings import register_permission_classes +from dj_rest_auth.registration.views import RegisterView +from dj_rest_auth.registration.app_settings import register_permission_classes from .mixins import TestsMixin, CustomPermissionClass diff --git a/dj_rest_auth/tests/urls.py b/dj_rest_auth/tests/urls.py index 401f23a..ef900b9 100644 --- a/dj_rest_auth/tests/urls.py +++ b/dj_rest_auth/tests/urls.py @@ -7,12 +7,12 @@ from allauth.socialaccount.providers.twitter.views import TwitterOAuthAdapter from rest_framework.decorators import api_view -from rest_auth.urls import urlpatterns -from rest_auth.registration.views import ( +from dj_rest_auth.urls import urlpatterns +from dj_rest_auth.registration.views import ( SocialLoginView, SocialConnectView, SocialAccountListView, SocialAccountDisconnectView ) -from rest_auth.social_serializers import ( +from dj_rest_auth.social_serializers import ( TwitterLoginSerializer, TwitterConnectSerializer ) diff --git a/dj_rest_auth/urls.py b/dj_rest_auth/urls.py index 7a35e9b..6664722 100644 --- a/dj_rest_auth/urls.py +++ b/dj_rest_auth/urls.py @@ -1,6 +1,6 @@ from django.conf.urls import url -from rest_auth.views import ( +from dj_rest_auth.views import ( LoginView, LogoutView, UserDetailsView, PasswordChangeView, PasswordResetView, PasswordResetConfirmView ) diff --git a/runtests.py b/runtests.py index cabaf9c..6fab508 100644 --- a/runtests.py +++ b/runtests.py @@ -17,7 +17,7 @@ def runtests(): test_runner = TestRunner(verbosity=1, interactive=True) if hasattr(django, 'setup'): django.setup() - failures = test_runner.run_tests(['rest_auth']) + failures = test_runner.run_tests(['dj_rest_auth']) sys.exit(bool(failures)) if __name__ == '__main__':