-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support Django 2.0 #33
base: master
Are you sure you want to change the base?
Conversation
@waseem-omar When we did upgrades for Memria and Donor, we dropped using django-users-plus library and maintained the code needed inside of those repos. Do we need to do this? |
fc9cd1f
to
5846d0e
Compare
@waseem-omar For Memria, we refactored code related to masquerading, check this out |
accountsplus/admin.py
Outdated
@@ -185,7 +183,7 @@ def reset_passwords(self, request, queryset): | |||
reset_passwords.short_description = 'Send password reset emails to selected Users' | |||
|
|||
def get_timezone(self, obj): | |||
return unicode(obj.timezone) | |||
return str(obj.timezone) | |||
|
|||
def masquerade(self, obj): | |||
return '<a href="{}">sign in</a>'.format(django.urls.reverse('masquerade', kwargs={'user_id': obj.id})) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@waseem-omar I think we need to mark this as SafeString
so that it appears as hyperlink in the table
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should look like this django.utils.html.mark_safe('<a href="{}">sign in</a>'.format(django.urls.reverse('masquerade', kwargs={'user_id': obj.id})))
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done @nasief, I have also refactored Masquerading views as you suggested above.
No description provided.