Skip to content
Snippets Groups Projects
Commit c0415830 authored by Samuel GAIST's avatar Samuel GAIST
Browse files

[navigation][models] Move __unicode__ to __str__

__unicode__ is a leftover of Python 2
parent a3cbfb1e
No related branches found
No related tags found
1 merge request!314Cleanup model representation
......@@ -29,19 +29,15 @@ from django.db import models
from django.contrib.auth.models import User
#----------------------------------------------------------
# ----------------------------------------------------------
class Agreement(models.Model):
user = models.OneToOneField(User)
version = models.PositiveIntegerField(
default=1,
help_text='Last version of the ToS the user has agreed with',
default=1, help_text="Last version of the ToS the user has agreed with"
)
def __unicode__(self):
return u"%s agrees with ToS version %d" % (
self.user.username,
self.version
)
def __str__(self):
return "%s agrees with ToS version %d" % (self.user.username, self.version)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment