Skip to content

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?

@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

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.

3 participants