Skip to content

Commit

Permalink
Switch to maintained dj-rest-auth package
Browse files Browse the repository at this point in the history
  • Loading branch information
nuwang committed Sep 14, 2022
1 parent 8f196f4 commit 39835ff
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 11 deletions.
10 changes: 2 additions & 8 deletions django-cloudlaunch/cloudlaunch/views.py
@@ -1,13 +1,9 @@
from django.http import HttpResponse
from django_filters import rest_framework as dj_filters
from rest_auth.registration.views import RegisterView
from dj_rest_auth.registration.views import RegisterView
from rest_framework import authentication
from rest_framework import filters
from rest_framework import generics
from rest_framework import mixins
from rest_framework import permissions
from rest_framework import renderers
from rest_framework import status
from rest_framework import viewsets
from rest_framework.pagination import PageNumberPagination
from rest_framework.permissions import IsAuthenticated
Expand All @@ -21,8 +17,6 @@
from djcloudbridge import drf_helpers
from . import models
from . import serializers
from . import view_helpers
from django.core.exceptions import ObjectDoesNotExist


class CustomApplicationPagination(PageNumberPagination):
Expand Down Expand Up @@ -195,7 +189,7 @@ def get_queryset(self):
# Override registration view so that it supports multiple tokens
from django.conf import settings
from allauth.account import app_settings as allauth_settings
from rest_auth.app_settings import TokenSerializer
from dj_rest_auth.app_settings import TokenSerializer

class CustomRegisterView(RegisterView):

Expand Down
4 changes: 2 additions & 2 deletions django-cloudlaunch/cloudlaunchserver/settings.py
Expand Up @@ -88,10 +88,10 @@
'django.contrib.sites',
'nested_admin',
'corsheaders',
'rest_auth',
'dj_rest_auth',
'allauth',
'allauth.account',
'rest_auth.registration',
'dj_rest_auth.registration',
'allauth.socialaccount',
'allauth.socialaccount.providers.facebook',
'allauth.socialaccount.providers.github',
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Expand Up @@ -53,7 +53,7 @@ def get_version(*file_paths):
# ======== DRF =========
'djangorestframework>=3.7.3',
# login support for DRF through restful endpoints
'django-rest-auth>=0.9.1',
'dj-rest-auth',
# pluggable social auth for django login
'django-allauth>=0.34.0',
# Provides nested routing for DRF
Expand Down

0 comments on commit 39835ff

Please sign in to comment.