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

overriding __str__ does not work on python 3.6 #45

Closed
jangeador opened this issue Mar 2, 2018 · 3 comments
Closed

overriding __str__ does not work on python 3.6 #45

jangeador opened this issue Mar 2, 2018 · 3 comments

Comments

@jangeador
Copy link
Contributor

The str method on the Attachment model is not getting interpolated is returning a literal {username} attached {filename}

This model method:

    def __str__(self):
        return _('{username} attached {filename}') % {
            'username': self.creator.get_username(),
            'filename': self.attachment_file.name
        }
@bartTC
Copy link
Owner

bartTC commented Mar 2, 2018

should be good, please try it again.

@jangeador
Copy link
Contributor Author

Oh, I was working on it as well. You might want to add the test from my PR #48 it tests that str method.

@jangeador
Copy link
Contributor Author

Thanks for getting on that so quickly by the way. You're awesome!

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

No branches or pull requests

2 participants