Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
itminedu
synnefo
Commits
b8cb7637
Commit
b8cb7637
authored
May 21, 2013
by
Sofia Papagiannaki
Browse files
astakos: remove unused imports
parent
9e82c0ee
Changes
14
Hide whitespace changes
Inline
Side-by-side
snf-astakos-app/astakos/im/activation_backends.py
View file @
b8cb7637
...
...
@@ -36,7 +36,6 @@ from django.core.exceptions import ImproperlyConfigured
from
django.utils.translation
import
ugettext
as
_
from
astakos.im.models
import
AstakosUser
from
astakos.im.util
import
get_invitation
from
astakos.im
import
functions
from
astakos.im
import
settings
from
astakos.im
import
forms
...
...
snf-astakos-app/astakos/im/forms.py
View file @
b8cb7637
...
...
@@ -31,48 +31,35 @@
# interpreted as representing official policies, either expressed
# or implied, of GRNET S.A.
from
random
import
random
from
datetime
import
datetime
,
timedelta
from
datetime
import
datetime
from
django
import
forms
from
django.utils.translation
import
ugettext
as
_
from
django.contrib.auth.forms
import
(
UserCreationForm
,
AuthenticationForm
,
PasswordResetForm
,
PasswordChangeForm
,
SetPasswordForm
)
from
django.contrib.auth.forms
import
UserCreationForm
,
AuthenticationForm
,
\
PasswordResetForm
,
PasswordChangeForm
,
SetPasswordForm
from
django.core.mail
import
send_mail
,
get_connection
from
django.contrib.auth.tokens
import
default_token_generator
from
django.template
import
Context
,
loader
from
django.utils.http
import
int_to_base36
from
django.core.urlresolvers
import
reverse
from
django.utils.safestring
import
mark_safe
from
django.utils.encoding
import
smart_str
from
django.conf
import
settings
from
django.forms.models
import
fields_for_model
from
django.db
import
transaction
from
django.utils.encoding
import
smart_unicode
from
django.core
import
validators
from
django.contrib.auth.models
import
AnonymousUser
from
django.core.exceptions
import
PermissionDenied
from
synnefo_branding.utils
import
render_to_string
from
synnefo.lib
import
join_urls
from
astakos.im.models
import
(
AstakosUser
,
EmailChange
,
Invitation
,
Resource
,
PendingThirdPartyUser
,
get_latest_terms
,
ProjectApplication
,
Project
)
from
astakos.im.settings
import
(
INVITATIONS_PER_LEVEL
,
BASEURL
,
SITENAME
,
RECAPTCHA_PRIVATE_KEY
,
RECAPTCHA_ENABLED
,
CONTACT_EMAIL
,
LOGGING_LEVEL
,
PASSWORD_RESET_EMAIL_SUBJECT
,
NEWPASSWD_INVALIDATE_TOKEN
,
MODERATION_ENABLED
,
EMAILCHANGE_ENABLED
,
)
from
astakos.im.models
import
AstakosUser
,
EmailChange
,
Invitation
,
Resource
,
\
PendingThirdPartyUser
,
get_latest_terms
,
ProjectApplication
,
Project
from
astakos.im.settings
import
BASEURL
,
SITENAME
,
RECAPTCHA_PRIVATE_KEY
,
\
RECAPTCHA_ENABLED
,
CONTACT_EMAIL
,
PASSWORD_RESET_EMAIL_SUBJECT
,
\
NEWPASSWD_INVALIDATE_TOKEN
,
EMAILCHANGE_ENABLED
from
astakos.im
import
presentation
from
astakos.im.widgets
import
DummyWidget
,
RecaptchaWidget
from
astakos.im.functions
import
(
send_change_email
,
submit_application
,
accept_membership_checks
)
from
astakos.im.functions
import
send_change_email
,
submit_application
,
\
accept_membership_checks
from
astakos.im.util
import
reserved_email
,
reserved_verified_email
,
\
get_query
,
model_to_dict
from
astakos.im.util
import
reserved_verified_email
,
model_to_dict
from
astakos.im
import
auth_providers
import
astakos.im.messages
as
astakos_messages
...
...
snf-astakos-app/astakos/im/functions.py
View file @
b8cb7637
...
...
@@ -32,37 +32,27 @@
# or implied, of GRNET S.A.
import
logging
import
socket
from
django.utils.translation
import
ugettext
as
_
from
django.core.mail
import
send_mail
,
get_connection
from
django.core.urlresolvers
import
reverse
from
django.template
import
Context
,
loader
from
django.contrib.auth
import
(
login
as
auth_login
,
logout
as
auth_logout
)
from
django.contrib.auth.models
import
AnonymousUser
from
django.core.exceptions
import
PermissionDenied
from
django.db
import
IntegrityError
from
django.db.models
import
Q
from
django.http
import
Http404
from
synnefo_branding.utils
import
render_to_string
from
urllib
import
quote
from
smtplib
import
SMTPException
from
datetime
import
datetime
from
functools
import
wraps
from
synnefo.lib
import
join_urls
from
astakos.im.settings
import
(
CONTACT_EMAIL
,
SITENAME
,
BASEURL
,
LOGGING_LEVEL
,
VERIFICATION_EMAIL_SUBJECT
,
ACCOUNT_CREATION_SUBJECT
,
GROUP_CREATION_SUBJECT
,
HELPDESK_NOTIFICATION_EMAIL_SUBJECT
,
HELPDESK_NOTIFICATION_EMAIL_SUBJECT
,
INVITATION_EMAIL_SUBJECT
,
GREETING_EMAIL_SUBJECT
,
FEEDBACK_EMAIL_SUBJECT
,
EMAIL_CHANGE_EMAIL_SUBJECT
,
)
from
astakos.im.notifications
import
build_notification
,
NotificationError
from
astakos.im.models
import
(
AstakosUser
,
Invitation
,
ProjectMembership
,
ProjectApplication
,
Project
,
Chain
,
new_chain
)
...
...
snf-astakos-app/astakos/im/models.py
View file @
b8cb7637
...
...
@@ -41,19 +41,15 @@ import copy
from
time
import
asctime
from
datetime
import
datetime
,
timedelta
from
base64
import
b64encode
from
urlparse
import
urlparse
from
urllib
import
quote
from
random
import
randint
from
django.db
import
models
,
IntegrityError
,
transaction
from
django.contrib.auth.models
import
User
,
UserManager
,
Group
,
Permission
from
django.utils.translation
import
ugettext
as
_
from
django.core.exceptions
import
ValidationError
from
django.db.models.signals
import
(
pre_save
,
post_save
,
post_syncdb
,
post_delete
)
from
django.db.models.signals
import
pre_save
,
post_save
from
django.contrib.contenttypes.models
import
ContentType
from
django.dispatch
import
Signal
from
django.db.models
import
Q
,
Max
from
django.core.urlresolvers
import
reverse
from
django.utils.http
import
int_to_base36
...
...
@@ -61,16 +57,11 @@ from django.contrib.auth.tokens import default_token_generator
from
django.conf
import
settings
from
django.utils.importlib
import
import_module
from
django.utils.safestring
import
mark_safe
from
django.core.validators
import
email_re
from
django.core.exceptions
import
PermissionDenied
,
ObjectDoesNotExist
from
synnefo.lib.utils
import
dict_merge
from
astakos.im.settings
import
(
DEFAULT_USER_LEVEL
,
INVITATIONS_PER_LEVEL
,
AUTH_TOKEN_DURATION
,
EMAILCHANGE_ACTIVATION_DAYS
,
LOGGING_LEVEL
,
SITENAME
,
MODERATION_ENABLED
,
)
from
astakos.im.settings
import
DEFAULT_USER_LEVEL
,
INVITATIONS_PER_LEVEL
,
\
AUTH_TOKEN_DURATION
,
EMAILCHANGE_ACTIVATION_DAYS
,
LOGGING_LEVEL
from
astakos.im
import
settings
as
astakos_settings
from
astakos.im
import
auth_providers
as
auth
...
...
snf-astakos-app/astakos/im/notifications.py
View file @
b8cb7637
...
...
@@ -36,7 +36,6 @@ import socket
from
smtplib
import
SMTPException
from
django.conf
import
settings
from
django.core.mail
import
send_mail
,
get_connection
from
django.utils.translation
import
ugettext
as
_
from
synnefo_branding.utils
import
render_to_string
...
...
snf-astakos-app/astakos/im/tables.py
View file @
b8cb7637
...
...
@@ -31,8 +31,6 @@
# interpreted as representing official policies, either expressed
# or implied, of GRNET S.A.
from
collections
import
defaultdict
from
django.utils.translation
import
ugettext
as
_
from
django.utils.safestring
import
mark_safe
from
django.template
import
Context
,
Template
...
...
@@ -44,9 +42,8 @@ import django_tables2 as tables
from
astakos.im.models
import
*
from
astakos.im.templatetags.filters
import
truncatename
from
astakos.im.functions
import
(
join_project_checks
,
can_leave_request
,
cancel_membership_checks
)
from
astakos.im.functions
import
join_project_checks
,
can_leave_request
,
\
cancel_membership_checks
DEFAULT_DATE_FORMAT
=
"d/m/Y"
...
...
snf-astakos-app/astakos/im/views/im.py
View file @
b8cb7637
...
...
@@ -32,86 +32,41 @@
# or implied, of GRNET S.A.
import
logging
import
calendar
import
inflect
engine
=
inflect
.
engine
()
from
urllib
import
quote
from
functools
import
wraps
from
datetime
import
datetime
from
synnefo.lib.ordereddict
import
OrderedDict
from
django_tables2
import
RequestConfig
from
django.shortcuts
import
get_object_or_404
from
django.contrib
import
messages
from
django.contrib.auth.decorators
import
login_required
from
django.core.urlresolvers
import
reverse
from
django.db
import
transaction
from
django.db.utils
import
IntegrityError
from
django.http
import
(
HttpResponse
,
HttpResponseBadRequest
,
HttpResponseForbidden
,
HttpResponseRedirect
,
HttpResponseBadRequest
,
Http404
)
from
django.http
import
HttpResponse
,
HttpResponseRedirect
,
Http404
from
django.shortcuts
import
redirect
from
django.template
import
RequestContext
,
loader
as
template_loader
from
django.utils.http
import
urlencode
from
django.utils.html
import
escape
from
django.utils.safestring
import
mark_safe
from
django.utils.translation
import
ugettext
as
_
from
django.views.generic.create_update
import
(
apply_extra_context
,
lookup_object
,
delete_object
,
get_model_and_form_class
)
from
django.views.generic.list_detail
import
object_list
,
object_detail
from
django.core.xheaders
import
populate_xheaders
from
django.core.exceptions
import
ValidationError
,
PermissionDenied
from
django.core.exceptions
import
PermissionDenied
from
django.views.decorators.http
import
require_http_methods
from
django.db.models
import
Q
from
django.utils
import
simplejson
as
json
from
django.contrib.auth.views
import
redirect_to_login
from
synnefo_branding.utils
import
render_to_string
import
astakos.im.messages
as
astakos_messages
from
astakos.im
import
activation_backends
from
astakos.im
import
tables
from
astakos.im.models
import
(
AstakosUser
,
ApprovalTerms
,
EmailChange
,
AstakosUserAuthProvider
,
PendingThirdPartyUser
,
ProjectApplication
,
ProjectMembership
,
Project
,
Service
,
Resource
)
from
astakos.im.util
import
(
get_context
,
prepare_response
,
get_query
,
restrict_next
,
model_to_dict
)
from
astakos.im.forms
import
(
LoginForm
,
InvitationForm
,
FeedbackForm
,
SignApprovalTermsForm
,
EmailChangeForm
,
ProjectApplicationForm
,
ProjectSortForm
,
AddProjectMembersForm
,
ProjectSearchForm
,
ProjectMembersSortForm
)
from
astakos.im.models
import
AstakosUser
,
ApprovalTerms
,
EmailChange
,
\
AstakosUserAuthProvider
,
PendingThirdPartyUser
,
Service
from
astakos.im.util
import
get_context
,
prepare_response
,
get_query
,
\
restrict_next
from
astakos.im.forms
import
LoginForm
,
InvitationForm
,
FeedbackForm
,
\
SignApprovalTermsForm
,
EmailChangeForm
from
astakos.im.forms
import
ExtendedProfileForm
as
ProfileForm
from
astakos.im.functions
import
(
send_feedback
,
logout
as
auth_logout
,
invite
as
invite_func
,
check_pending_app_quota
,
accept_membership
,
reject_membership
,
remove_membership
,
cancel_membership
,
leave_project
,
join_project
,
enroll_member
,
can_join_request
,
can_leave_request
,
get_related_project_id
,
get_by_chain_or_404
,
approve_application
,
deny_application
,
cancel_application
,
dismiss_application
)
from
astakos.im.settings
import
(
COOKIE_DOMAIN
,
LOGOUT_NEXT
,
LOGGING_LEVEL
,
PAGINATE_BY
,
PAGINATE_BY_ALL
,
ACTIVATION_REDIRECT_URL
,
MODERATION_ENABLED
)
from
astakos.im.functions
import
send_feedback
,
logout
as
auth_logout
,
\
invite
as
invite_func
from
astakos.im.settings
import
COOKIE_DOMAIN
,
LOGOUT_NEXT
,
\
ACTIVATION_REDIRECT_URL
from
astakos.im
import
presentation
from
astakos.im
import
settings
from
astakos.im
import
auth_providers
as
auth
from
snf_django.lib.db.transaction
import
commit_on_success_strict
from
astakos.im.ctx
import
ExceptionHandler
from
astakos.im
import
quotas
from
astakos.im.views.util
import
render_response
,
_resources_catalog
from
astakos.im.views.decorators
import
cookie_fix
,
signed_terms_required
,
\
...
...
snf-astakos-app/astakos/im/views/projects.py
View file @
b8cb7637
...
...
@@ -32,92 +32,45 @@
# or implied, of GRNET S.A.
import
logging
import
calendar
import
inflect
engine
=
inflect
.
engine
()
from
urllib
import
quote
from
functools
import
wraps
from
datetime
import
datetime
from
synnefo.lib.ordereddict
import
OrderedDict
from
django_tables2
import
RequestConfig
from
django.shortcuts
import
get_object_or_404
from
django.contrib
import
messages
from
django.contrib.auth.decorators
import
login_required
from
django.core.urlresolvers
import
reverse
from
django.db
import
transaction
from
django.db.utils
import
IntegrityError
from
django.http
import
(
HttpResponse
,
HttpResponseBadRequest
,
HttpResponseForbidden
,
HttpResponseRedirect
,
HttpResponseBadRequest
,
Http404
)
from
django.http
import
Http404
from
django.shortcuts
import
redirect
from
django.template
import
RequestContext
,
loader
as
template_loader
from
django.utils.http
import
urlencode
from
django.utils.html
import
escape
from
django.utils.safestring
import
mark_safe
from
django.utils.translation
import
ugettext
as
_
from
django.views.generic.create_update
import
(
apply_extra_context
,
lookup_object
,
delete_object
,
get_model_and_form_class
)
from
django.views.generic.list_detail
import
object_list
,
object_detail
from
django.core.xheaders
import
populate_xheaders
from
django.core.exceptions
import
ValidationError
,
PermissionDenied
from
django.core.exceptions
import
PermissionDenied
from
django.views.decorators.http
import
require_http_methods
from
django.db.models
import
Q
from
django.utils
import
simplejson
as
json
from
django.contrib.auth.views
import
redirect_to_login
from
synnefo_branding.utils
import
render_to_string
from
snf_django.lib.db.transaction
import
commit_on_success_strict
import
astakos.im.messages
as
astakos_messages
from
astakos.im
import
activation_backends
from
astakos.im
import
tables
from
astakos.im.models
import
(
AstakosUser
,
ApprovalTerms
,
EmailChange
,
AstakosUserAuthProvider
,
PendingThirdPartyUser
,
ProjectApplication
,
ProjectMembership
,
Project
,
Service
,
Resource
)
from
astakos.im.util
import
(
get_context
,
prepare_response
,
get_query
,
restrict_next
,
model_to_dict
)
from
astakos.im.forms
import
(
LoginForm
,
InvitationForm
,
FeedbackForm
,
SignApprovalTermsForm
,
EmailChangeForm
,
ProjectApplicationForm
,
ProjectSortForm
,
AddProjectMembersForm
,
ProjectSearchForm
,
ProjectMembersSortForm
)
from
astakos.im.forms
import
ExtendedProfileForm
as
ProfileForm
from
astakos.im.functions
import
(
send_feedback
,
logout
as
auth_logout
,
invite
as
invite_func
,
check_pending_app_quota
,
accept_membership
,
reject_membership
,
remove_membership
,
cancel_membership
,
leave_project
,
join_project
,
enroll_member
,
can_join_request
,
can_leave_request
,
get_related_project_id
,
get_by_chain_or_404
,
approve_application
,
deny_application
,
cancel_application
,
dismiss_application
)
from
astakos.im.settings
import
(
COOKIE_DOMAIN
,
LOGOUT_NEXT
,
LOGGING_LEVEL
,
PAGINATE_BY
,
PAGINATE_BY_ALL
,
ACTIVATION_REDIRECT_URL
,
MODERATION_ENABLED
)
from
astakos.im
import
presentation
from
astakos.im
import
settings
from
astakos.im
import
auth_providers
as
auth
from
snf_django.lib.db.transaction
import
commit_on_success_strict
from
astakos.im.models
import
ProjectApplication
from
astakos.im.util
import
get_context
,
restrict_next
from
astakos.im.forms
import
ProjectApplicationForm
,
AddProjectMembersForm
,
\
ProjectSearchForm
from
astakos.im.functions
import
check_pending_app_quota
,
accept_membership
,
\
reject_membership
,
remove_membership
,
cancel_membership
,
leave_project
,
\
join_project
,
enroll_member
,
can_join_request
,
can_leave_request
,
\
get_related_project_id
,
get_by_chain_or_404
,
approve_application
,
\
deny_application
,
cancel_application
,
dismiss_application
from
astakos.im.settings
import
COOKIE_DOMAIN
,
PAGINATE_BY
from
astakos.im.ctx
import
ExceptionHandler
from
astakos.im
import
quotas
from
astakos.im.views.util
import
render_response
,
_create_object
,
\
_update_object
,
_resources_catalog
from
astakos.im.views.decorators
import
cookie_fix
,
signed_terms_required
,
\
required_auth_methods_assigned
,
valid_astakos_user_required
valid_astakos_user_required
logger
=
logging
.
getLogger
(
__name__
)
...
...
snf-astakos-app/astakos/im/views/target/__init__.py
View file @
b8cb7637
...
...
@@ -34,7 +34,6 @@
import
json
from
django.contrib
import
messages
from
django.utils.translation
import
ugettext
as
_
from
django.http
import
HttpResponseRedirect
from
django.core.urlresolvers
import
reverse
from
django.db
import
transaction
...
...
@@ -43,9 +42,8 @@ from astakos.im.models import PendingThirdPartyUser, AstakosUser
from
astakos.im.util
import
get_query
,
login_url
from
astakos.im
import
messages
as
astakos_messages
from
astakos.im
import
auth_providers
as
auth
from
astakos.im.util
import
prepare_response
,
get_context
from
astakos.im.views.util
import
render_response
from
astakos.im.views.decorators
import
requires_anonymous
from
astakos.im.util
import
prepare_response
import
logging
logger
=
logging
.
getLogger
(
__name__
)
...
...
snf-astakos-app/astakos/im/views/target/google.py
View file @
b8cb7637
...
...
@@ -33,41 +33,24 @@
import
json
from
django.http
import
HttpResponseBadRequest
from
django.utils.translation
import
ugettext
as
_
from
django.contrib
import
messages
from
django.template
import
RequestContext
from
django.views.decorators.http
import
require_http_methods
from
django.http
import
HttpResponseRedirect
from
django.core.urlresolvers
import
reverse
from
django.core.exceptions
import
ImproperlyConfigured
from
django.shortcuts
import
get_object_or_404
from
urlparse
import
urlunsplit
,
urlsplit
from
astakos.im.util
import
prepare_response
,
get_context
,
login_url
from
astakos.im.settings
import
ENABLE_LOCAL_ACCOUNT_MIGRATION
,
BASEURL
from
astakos.im.models
import
AstakosUser
,
PendingThirdPartyUser
from
astakos.im.forms
import
LoginForm
from
astakos.im.activation_backends
import
get_backend
,
SimpleBackend
from
astakos.im.models
import
AstakosUser
from
astakos.im
import
settings
from
astakos.im
import
auth_providers
from
astakos.im.views.target
import
add_pending_auth_provider
,
get_pending_key
,
\
from
astakos.im.views.target
import
get_pending_key
,
\
handle_third_party_signup
,
handle_third_party_login
,
init_third_party_session
from
astakos.im.views.util
import
render_response
from
astakos.im.views.decorators
import
cookie_fix
,
requires_anonymous
,
\
requires_auth_provider
from
astakos.im.views.decorators
import
cookie_fix
,
requires_auth_provider
import
logging
import
time
import
astakos.im.messages
as
astakos_messages
import
urlparse
import
urllib
logger
=
logging
.
getLogger
(
__name__
)
import
oauth2
as
oauth
import
cgi
signature_method
=
oauth
.
SignatureMethod_HMAC_SHA1
()
...
...
snf-astakos-app/astakos/im/views/target/linkedin.py
View file @
b8cb7637
...
...
@@ -33,33 +33,18 @@
import
json
from
django.http
import
HttpResponseBadRequest
from
django.utils.translation
import
ugettext
as
_
from
django.contrib
import
messages
from
django.template
import
RequestContext
from
django.views.decorators.http
import
require_http_methods
from
django.http
import
HttpResponseRedirect
from
django.core.urlresolvers
import
reverse
from
django.core.exceptions
import
ImproperlyConfigured
from
django.shortcuts
import
get_object_or_404
from
urlparse
import
urlunsplit
,
urlsplit
from
astakos.im.util
import
prepare_response
,
get_context
,
login_url
from
astakos.im.settings
import
ENABLE_LOCAL_ACCOUNT_MIGRATION
,
BASEURL
from
astakos.im.models
import
AstakosUser
,
PendingThirdPartyUser
from
astakos.im.forms
import
LoginForm
from
astakos.im.activation_backends
import
get_backend
,
SimpleBackend
from
astakos.im.models
import
AstakosUser
from
astakos.im
import
settings
from
astakos.im
import
auth_providers
from
astakos.im.views.target
import
add_pending_auth_provider
,
get_pending_key
,
\
from
astakos.im.views.target
import
get_pending_key
,
\
handle_third_party_signup
,
handle_third_party_login
,
init_third_party_session
from
astakos.im.views.util
import
render_response
from
astakos.im.views.decorators
import
cookie_fix
,
requires_anonymous
,
\
from
astakos.im.views.decorators
import
cookie_fix
,
\
requires_auth_provider
import
astakos.im.messages
as
astakos_messages
import
logging
logger
=
logging
.
getLogger
(
__name__
)
...
...
snf-astakos-app/astakos/im/views/target/local.py
View file @
b8cb7637
...
...
@@ -44,17 +44,14 @@ from django.contrib.auth.decorators import login_required
import
django.contrib.auth.views
as
django_auth_views
from
astakos.im.util
import
prepare_response
,
get_query
from
astakos.im.views.decorators
import
requires_anonymous
,
\
signed_terms_required
,
requires_auth_provider
from
astakos.im.models
import
PendingThirdPartyUser
from
astakos.im.forms
import
LoginForm
,
ExtendedPasswordChangeForm
,
\
ExtendedSetPasswordForm
from
astakos.im.settings
import
(
RATELIMIT_RETRIES_ALLOWED
,
ENABLE_LOCAL_ACCOUNT_MIGRATION
)
from
astakos.im.settings
import
RATELIMIT_RETRIES_ALLOWED
import
astakos.im.messages
as
astakos_messages
from
astakos.im
import
settings
from
astakos.im
import
auth_providers
as
auth
from
astakos.im.views.decorators
import
cookie_fix
,
signed_terms_required
from
astakos.im.views.decorators
import
cookie_fix
,
requires_anonymous
,
\
signed_terms_required
,
requires_auth_provider
from
ratelimit.decorators
import
ratelimit
...
...
snf-astakos-app/astakos/im/views/target/shibboleth.py
View file @
b8cb7637
...
...
@@ -31,33 +31,19 @@
# interpreted as representing official policies, either expressed
# or implied, of GRNET S.A.
import
json
from
django.conf
import
settings
as
global_settings
from
django.http
import
HttpResponseBadRequest
from
django.utils.translation
import
ugettext
as
_
from
django.contrib
import
messages
from
django.template
import
RequestContext
from
django.views.decorators.http
import
require_http_methods
from
django.http
import
HttpResponseRedirect
from
django.core.urlresolvers
import
reverse
from
django.core.exceptions
import
ImproperlyConfigured
from
django.shortcuts
import
get_object_or_404
from
urlparse
import
urlunsplit
,
urlsplit
from
astakos.im.util
import
prepare_response
,
get_context
,
login_url
from
astakos.im.settings
import
ENABLE_LOCAL_ACCOUNT_MIGRATION
,
BASEURL
from
astakos.im.models
import
AstakosUser
,
PendingThirdPartyUser
from
astakos.im.forms
import
LoginForm
from
astakos.im.activation_backends
import
get_backend
,
SimpleBackend
from
astakos.im
import
auth_providers
from
astakos.im.util
import
login_url
from
astakos.im.models
import
AstakosUser
from
astakos.im
import
settings
from
astakos.im.views.target
import
add_pending_auth_provider
,
get_pending_key
,
\
handle_third_party_signup
,
handle_third_party_login
,
init_third_party_session
from
astakos.im.views.util
import
render_response
from
astakos.im.views.decorators
import
cookie_fix
,
requires_anonymous
,
\
requires_auth_provider
from
astakos.im.views.target
import
get_pending_key
,
\
handle_third_party_signup
,
handle_third_party_login
,
\
init_third_party_session
from
astakos.im.views.decorators
import
cookie_fix
,
requires_auth_provider
import
astakos.im.messages
as
astakos_messages
import
logging
...
...
snf-astakos-app/astakos/im/views/target/twitter.py
View file @
b8cb7637
...
...
@@ -31,35 +31,21 @@
# interpreted as representing official policies, either expressed
# or implied, of GRNET S.A.
import
json
import
logging
from
django.http
import
HttpResponseBadRequest
from
django.utils.translation
import
ugettext
as
_
from
django.contrib
import
messages
from
django.template
import
RequestContext
from
django.views.decorators.http
import
require_http_methods
from
django.http
import
HttpResponseRedirect
,
urlencode
from
django.core.urlresolvers
import
reverse
from
django.core.exceptions
import
ImproperlyConfigured
from
django.shortcuts
import
get_object_or_404
from
urlparse
import
urlunsplit
,
urlsplit
,
parse_qsl
from
astakos.im.util
import
prepare_response
,
get_context
,
login_url
from
astakos.im.settings
import
ENABLE_LOCAL_ACCOUNT_MIGRATION
,
BASEURL
from
astakos.im.models
import
AstakosUser
,
PendingThirdPartyUser
from
astakos.im.forms
import
LoginForm
from
astakos.im.activation_backends
import
get_backend
,
SimpleBackend
from
astakos.im.models
import
AstakosUser
from
astakos.im
import
settings
from
astakos.im
import
auth_providers
from
astakos.im.views.target
import
add_pending_auth_provider
,
get_pending_key
,
\
handle_third_party_signup
,
handle_third_party_login
,
init_third_party_session
from
astakos.im.views.util
import
render_response
from
astakos.im.views.decorators
import
cookie_fix
,
requires_anonymous
,
\
requires_auth_provider
,
required_auth_methods_assigned
import
astakos.im.messages
as
astakos_messages
from
astakos.im.views.target
import
get_pending_key
,
\
handle_third_party_signup
,
handle_third_party_login
,
\
init_third_party_session
from
astakos.im.views.decorators
import
cookie_fix
,
requires_auth_provider
logger
=
logging
.
getLogger
(
__name__
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment