Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Python 3 support to convert Token objects to str
__unicode__ method doesn't work on Python 3
  • Loading branch information
cript0nauta committed Dec 2, 2014
commit 18c4847922cc4084aaa58b23197bc6eea9e86afd
3 changes: 3 additions & 0 deletions rest_framework/authtoken/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,3 +37,6 @@ def generate_key(self):

def __unicode__(self):
return self.key

def __str__(self):
return self.key