mirror of
https://github.com/Tivix/django-rest-auth.git
synced 2024-11-10 19:26:35 +03:00
adding static code analysis
This commit is contained in:
parent
ea782b83e2
commit
9803d9f941
|
@ -21,3 +21,5 @@ script:
|
|||
- coverage run --source=rest_auth setup.py test
|
||||
after_success:
|
||||
- coveralls
|
||||
before_script:
|
||||
- flake8 . --config=flake8
|
||||
|
|
4
flake8
Normal file
4
flake8
Normal file
|
@ -0,0 +1,4 @@
|
|||
[flake8]
|
||||
max-line-length = 160
|
||||
exclude = docs/*,demo/*
|
||||
ignore = F403
|
|
@ -24,16 +24,22 @@ LoginSerializer = import_callable(
|
|||
)
|
||||
|
||||
PasswordResetSerializer = import_callable(
|
||||
serializers.get('PASSWORD_RESET_SERIALIZER',
|
||||
DefaultPasswordResetSerializer)
|
||||
serializers.get(
|
||||
'PASSWORD_RESET_SERIALIZER',
|
||||
DefaultPasswordResetSerializer
|
||||
)
|
||||
)
|
||||
|
||||
PasswordResetConfirmSerializer = import_callable(
|
||||
serializers.get('PASSWORD_RESET_CONFIRM_SERIALIZER',
|
||||
DefaultPasswordResetConfirmSerializer)
|
||||
serializers.get(
|
||||
'PASSWORD_RESET_CONFIRM_SERIALIZER',
|
||||
DefaultPasswordResetConfirmSerializer
|
||||
)
|
||||
)
|
||||
|
||||
PasswordChangeSerializer = import_callable(
|
||||
serializers.get('PASSWORD_CHANGE_SERIALIZER',
|
||||
DefaultPasswordChangeSerializer)
|
||||
serializers.get(
|
||||
'PASSWORD_CHANGE_SERIALIZER',
|
||||
DefaultPasswordChangeSerializer
|
||||
)
|
||||
)
|
||||
|
|
|
@ -21,7 +21,9 @@ class CustomRequestAuthenticationForm(AuthenticationForm):
|
|||
|
||||
@never_cache
|
||||
def remote_user_auth_view(request):
|
||||
"Dummy view for remote user tests"
|
||||
"""
|
||||
Dummy view for remote user tests
|
||||
"""
|
||||
t = Template("Username is {{ user }}.")
|
||||
c = RequestContext(request, {})
|
||||
return HttpResponse(t.render(c))
|
||||
|
@ -100,4 +102,4 @@ urlpatterns += [
|
|||
|
||||
# This line is only required to render the password reset with is_admin=True
|
||||
url(r'^admin/', include(admin.site.urls)),
|
||||
]
|
||||
]
|
||||
|
|
|
@ -11,7 +11,8 @@ from rest_auth.registration.views import SocialLogin
|
|||
class FacebookLogin(SocialLogin):
|
||||
adapter_class = FacebookOAuth2Adapter
|
||||
|
||||
urlpatterns += patterns('',
|
||||
urlpatterns += patterns(
|
||||
'',
|
||||
url(r'^rest-registration/', include('rest_auth.registration.urls')),
|
||||
url(r'^test-admin/', include(rest_auth.django_test_urls)),
|
||||
url(r'^account-email-verification-sent/$', TemplateView.as_view(),
|
||||
|
|
|
@ -1,9 +1,12 @@
|
|||
from django.conf.urls import patterns, url
|
||||
|
||||
from rest_auth.views import (Login, Logout, UserDetails, PasswordChange,
|
||||
PasswordReset, PasswordResetConfirm)
|
||||
from rest_auth.views import (
|
||||
Login, Logout, UserDetails, PasswordChange,
|
||||
PasswordReset, PasswordResetConfirm
|
||||
)
|
||||
|
||||
urlpatterns = patterns('',
|
||||
urlpatterns = patterns(
|
||||
'',
|
||||
# URLs that do not require a session or valid token
|
||||
url(r'^password/reset/$', PasswordReset.as_view(),
|
||||
name='rest_password_reset'),
|
||||
|
|
|
@ -9,4 +9,3 @@ def import_callable(path_or_callable):
|
|||
assert isinstance(path_or_callable, string_types)
|
||||
package, attr = path_or_callable.rsplit('.', 1)
|
||||
return getattr(import_module(package), attr)
|
||||
|
||||
|
|
|
@ -1,2 +1,3 @@
|
|||
django-allauth>=0.19.1
|
||||
responses>=0.3.0
|
||||
flake8==2.3.0
|
||||
|
|
Loading…
Reference in New Issue
Block a user