Skip to content
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

Open
wants to merge 8 commits into
base: master
Choose a base branch
from
Open

Support Django 2.0 #33

wants to merge 8 commits into from

Conversation

waseem-omar
Copy link
Member

No description provided.

@nasief
Copy link
Contributor

nasief commented May 21, 2019

@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?

accountsplus/urls.py Outdated Show resolved Hide resolved
accountsplus/urls.py Outdated Show resolved Hide resolved
@waseem-omar waseem-omar force-pushed the support_django_2.0 branch from fc9cd1f to 5846d0e Compare May 29, 2019 08:22
@nasief
Copy link
Contributor

nasief commented Jun 3, 2019

@waseem-omar For Memria, we refactored code related to masquerading, check this out

@@ -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}))
Copy link
Contributor

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

Copy link
Contributor

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})))

Copy link
Member Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants