Skip to content

Commit

Permalink
Merge e69c6d5 into 56a2fe1
Browse files Browse the repository at this point in the history
  • Loading branch information
st4lk committed Jan 1, 2020
2 parents 56a2fe1 + e69c6d5 commit d83630e
Show file tree
Hide file tree
Showing 11 changed files with 32 additions and 45 deletions.
33 changes: 8 additions & 25 deletions .travis.yml
Expand Up @@ -8,49 +8,32 @@ matrix:
- python: 3.5
env: TOXENV=py35-django111
- python: 3.5
env: TOXENV=py35-django20
- python: 3.5
env: TOXENV=py35-django21
- python: 3.5
dist: xenial
sudo: true
env: TOXENV=py35-django22

- python: 3.6
env: TOXENV=py36-django111
- python: 3.6
env: TOXENV=py36-django20
- python: 3.6
env: TOXENV=py36-django21
- python: 3.6
dist: xenial
sudo: true
env: TOXENV=py36-django22
- python: 3.6
env: TOXENV=py36-django30

- python: 3.7
dist: xenial
sudo: true
env: TOXENV=py37-django20
- python: 3.7
dist: xenial
sudo: true
env: TOXENV=py37-django21
env: TOXENV=py37-django111
- python: 3.7
dist: xenial
sudo: true
env: TOXENV=py37-django22
- python: 3.7
dist: xenial
sudo: true
env: TOXENV=py37-django111
env: TOXENV=py37-django30

- python: 3.8
env: TOXENV=py38-django30

install: pip install --quiet tox

# command to run tests
script: tox

after_script:
- if [ $TOXENV == "py37-django111" ]; then
- if [ $TOXENV == "py37-django22" ]; then
pip install --quiet coveralls;
coveralls;
fi
6 changes: 4 additions & 2 deletions README.md
Expand Up @@ -12,8 +12,8 @@ OAuth signin with django rest framework.
Requirements
-----------

- python (2.7, 3.5, 3.6, 3.7)
- django (1.11, 2.0, 2.1, 2.2)
- python (2.7, 3.5, 3.6, 3.7, 3.8)
- django (1.11, 2.2, 3.0)
- djangorestframework (>=3.1, <4.0)
- social-auth-core (>=3.0, <4.0)
- social-auth-app-django (>=3.1, <4.0)
Expand Down Expand Up @@ -528,6 +528,8 @@ There is an [example project](https://github.com/st4lk/django-rest-social-auth/t
- step 1: [image](https://user-images.githubusercontent.com/1771042/71641969-90ab7280-2cd6-11ea-95ed-de4c6e123345.png)
- step 2: [image](https://user-images.githubusercontent.com/1771042/71641970-91440900-2cd6-11ea-9275-f6c351ddc543.png)

More details [here](https://github.com/teddziuba/django-sslserver#browser-certificate-errors).

Example project already contains facebook, google and twitter app ids and secrets.
These apps are configured to work only with 127.0.0.1:8000 domain. Google and Facebook providers support localhost:8000 as well. But Twitter only support 127.0.0.1.

Expand Down
5 changes: 4 additions & 1 deletion RELEASE_NOTES.md
Expand Up @@ -3,9 +3,12 @@ rest_social_auth release notes

master
------
- Add Django 3.0 support
- Add Python 3.8 support
- Add Django 2.0, 2.1 support
- Fix facebook integration in example project: serve with fake TLS certificate

Issues: #104
Issues: #104, #106

v2.2.0
------
Expand Down
2 changes: 1 addition & 1 deletion example_project/templates/home_jwt.html
@@ -1,5 +1,5 @@
{% extends "base.html" %}
{% load staticfiles %}
{% load static %}

{% block content %}
<h3>Note! <a href="https://github.com/davesque/django-rest-framework-simplejwt">django-rest-framework-simplejwt</a> must be installed for this method</h3>
Expand Down
2 changes: 1 addition & 1 deletion example_project/templates/home_jwt_old.html
@@ -1,5 +1,5 @@
{% extends "base.html" %}
{% load staticfiles %}
{% load static %}

{% block content %}
<h1>rest_framework_jwt is deprecated and will be dropped in next version! Use <a href="https://github.com/davesque/django-rest-framework-simplejwt">rest_framework_simplejwt</a> instead!</h1>
Expand Down
2 changes: 1 addition & 1 deletion example_project/templates/home_knox.html
@@ -1,5 +1,5 @@
{% extends "base.html" %}
{% load staticfiles %}
{% load static %}

{% block content %}
<h3>Note! <a href="https://github.com/James1345/django-rest-knox/">django-rest-knox</a> must be installed for this method</h3>
Expand Down
2 changes: 1 addition & 1 deletion example_project/templates/home_session.html
@@ -1,5 +1,5 @@
{% extends "base.html" %}
{% load staticfiles %}
{% load static %}

{% block content %}
<div ng-app="SessionApp">
Expand Down
2 changes: 1 addition & 1 deletion example_project/templates/home_token.html
@@ -1,5 +1,5 @@
{% extends "base.html" %}
{% load staticfiles %}
{% load static %}

{% block content %}
<div ng-app="TokenApp">
Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
@@ -1,4 +1,4 @@
django>=1.11,<3.0
django>=1.11,<4.0
djangorestframework<4.0
social-auth-core>=3.0,<4.0
social-auth-app-django>=3.1.0,<4.0
6 changes: 2 additions & 4 deletions rest_social_auth/views.py
Expand Up @@ -2,16 +2,14 @@
import warnings

try:
from urlparse import urlparse
from urllib.parse import urljoin, urlparse # python 3x
except ImportError:
# python 3
from urllib.parse import urlparse
from urlparse import urljoin, urlparse # python 2x

from django.conf import settings
from django.http import HttpResponse
from django.utils.decorators import method_decorator
from django.utils.encoding import iri_to_uri
from django.utils.six.moves.urllib.parse import urljoin
from django.views.decorators.cache import never_cache
from django.views.decorators.csrf import csrf_protect
from social_django.utils import psa, STORAGE
Expand Down
15 changes: 8 additions & 7 deletions tox.ini
@@ -1,9 +1,10 @@
[tox]
envlist=
py{27}-django{111},
py{35}-django{111, 20, 21, 22},
py{36}-django{111, 20, 21, 22}
py{37}-django{111, 20, 21, 22}
py{35}-django{111, 22},
py{36}-django{111, 22, 30}
py{37}-django{111, 22, 30}
py{38}-django{22, 30}

[testenv]
setenv =
Expand All @@ -14,6 +15,7 @@ basepython =
py35: python3.5
py36: python3.6
py37: python3.7
py38: python3.8
deps =
djangorestframework<4.0
social-auth-core==3.0.0
Expand All @@ -22,10 +24,9 @@ deps =
djangorestframework_simplejwt
django-rest-knox<4.0.0
django111: Django>=1.11,<1.12
django20: Django>=2.0,<2.1
django21: Django>=2.1,<2.2
django22: Django>=2.2,<2.3
py37-django111: coverage
django30: Django>=3.0,<3.1
py37-django22: coverage
-rrequirements_test.txt
commands =
py.test {posargs}
Expand All @@ -34,7 +35,7 @@ commands =
commands =
py.test --ignore=tests/test_simple_jwt.py {posargs}

[testenv:py37-django111]
[testenv:py37-django22]
commands =
coverage run --source=rest_social_auth -m py.test {posargs}
coverage report

0 comments on commit d83630e

Please sign in to comment.