diff --git a/.gitignore b/.gitignore index 8a04b95..85446ba 100644 --- a/.gitignore +++ b/.gitignore @@ -33,6 +33,7 @@ htmlcov/ .cache nosetests.xml coverage.xml +coverage_html # Translations *.mo diff --git a/.travis.yml b/.travis.yml index 53c2a44..f07f4a3 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,22 +1,14 @@ language: python python: - - "2.6" - "2.7" env: - - DJANGO=1.5.12 - - DJANGO=1.6.11 - - DJANGO=1.7.7 - - DJANGO=1.8 -matrix: - exclude: - - python: "2.6" - env: DJANGO=1.7.7 - - python: "2.6" - env: DJANGO=1.8 + - DJANGO=1.7.11 + - DJANGO=1.8.9 + - DJANGO=1.9.2 install: - pip install -q Django==$DJANGO --use-mirrors - pip install coveralls - - pip install -r test_requirements.pip + - pip install -r rest_auth/tests/requirements.pip script: - coverage run --source=rest_auth setup.py test after_success: diff --git a/README.rst b/README.rst index 1e670d7..9014187 100644 --- a/README.rst +++ b/README.rst @@ -9,10 +9,6 @@ Welcome to django-rest-auth :target: https://coveralls.io/r/Tivix/django-rest-auth?branch=master -.. image:: https://requires.io/github/Tivix/django-rest-auth/requirements.png?branch=master - :target: https://requires.io/github/Tivix/django-rest-auth/requirements/?branch=master - - .. image:: https://readthedocs.org/projects/django-rest-auth/badge/?version=latest :target: https://readthedocs.org/projects/django-rest-auth/?badge=latest @@ -29,3 +25,7 @@ Source code ----------- https://github.com/Tivix/django-rest-auth + +Stack Overflow +----------- +http://stackoverflow.com/questions/tagged/django-rest-auth \ No newline at end of file diff --git a/demo/demo/settings.py b/demo/demo/settings.py index 50669e1..cd2d2f0 100644 --- a/demo/demo/settings.py +++ b/demo/demo/settings.py @@ -29,8 +29,10 @@ ALLOWED_HOSTS = [] TEMPLATE_CONTEXT_PROCESSORS = ( 'django.contrib.auth.context_processors.auth', "django.core.context_processors.request", - "allauth.account.context_processors.account", - "allauth.socialaccount.context_processors.socialaccount", + + # Disabling due to alluth>=0.21.0 changes + # "allauth.account.context_processors.account", + # "allauth.socialaccount.context_processors.socialaccount", ) # Application definition @@ -51,6 +53,8 @@ INSTALLED_APPS = ( 'allauth', 'allauth.account', 'rest_auth.registration', + 'allauth.socialaccount', + 'allauth.socialaccount.providers.facebook', ) MIDDLEWARE_CLASSES = ( @@ -102,9 +106,9 @@ TEMPLATE_DIRS = [os.path.join(BASE_DIR, 'templates')] REST_SESSION_LOGIN = False EMAIL_BACKEND = 'django.core.mail.backends.console.EmailBackend' SITE_ID = 1 -ACCOUNT_EMAIL_REQUIRED = True -ACCOUNT_AUTHENTICATION_METHOD = 'email' -ACCOUNT_EMAIL_VERIFICATION = 'mandatory' +ACCOUNT_EMAIL_REQUIRED = False +ACCOUNT_AUTHENTICATION_METHOD = 'username' +ACCOUNT_EMAIL_VERIFICATION = 'optional' REST_FRAMEWORK = { 'DEFAULT_AUTHENTICATION_CLASSES': ( diff --git a/demo/demo/urls.py b/demo/demo/urls.py index b2d7676..3813e5a 100644 --- a/demo/demo/urls.py +++ b/demo/demo/urls.py @@ -1,8 +1,8 @@ -from django.conf.urls import patterns, include, url +from django.conf.urls import include, url from django.contrib import admin from django.views.generic import TemplateView, RedirectView -urlpatterns = patterns('', +urlpatterns = [ url(r'^$', TemplateView.as_view(template_name="home.html"), name='home'), url(r'^signup/$', TemplateView.as_view(template_name="signup.html"), name='signup'), @@ -11,6 +11,8 @@ urlpatterns = patterns('', name='email-verification'), url(r'^login/$', TemplateView.as_view(template_name="login.html"), name='login'), + url(r'^logout/$', TemplateView.as_view(template_name="logout.html"), + name='logout'), url(r'^password-reset/$', TemplateView.as_view(template_name="password_reset.html"), name='password-reset'), @@ -35,5 +37,5 @@ urlpatterns = patterns('', url(r'^rest-auth/registration/', include('rest_auth.registration.urls')), url(r'^account/', include('allauth.urls')), url(r'^admin/', include(admin.site.urls)), - url(r'^accounts/profile/$', RedirectView.as_view(url='/'), name='profile-redirect'), -) + url(r'^accounts/profile/$', RedirectView.as_view(url='/', permanent=True), name='profile-redirect'), +] diff --git a/demo/requirements.pip b/demo/requirements.pip index 2583a95..f1c5057 100644 --- a/demo/requirements.pip +++ b/demo/requirements.pip @@ -1,4 +1,4 @@ -django>=1.5.0 -django-rest-auth==0.4.0 -django-allauth==0.19.1 +django>=1.7.0 +django-rest-auth==0.6.0 +django-allauth==0.24.1 six==1.9.0 diff --git a/demo/templates/base.html b/demo/templates/base.html index 8a0b0ed..03a2b73 100644 --- a/demo/templates/base.html +++ b/demo/templates/base.html @@ -40,6 +40,7 @@