Commits

Mark Lavin committed 118d055

Remove unicode prefixes for running example project using Python 3

  • Participants
  • Parent commits 1b67d3e

Comments (0)

Files changed (2)

File example/core/lookups.py

+from __future__ import unicode_literals
+
 from django.contrib.auth.models import User
 
 from selectable.base import ModelLookup
         return results
 
     def get_item_label(self, item):
-        return u"%s, %s" % (item.name, item.state)
+        return "%s, %s" % (item.name, item.state)
 
 
 registry.register(CityLookup)

File example/core/models.py

+from __future__ import unicode_literals
+
 from django.contrib.localflavor.us.models import USStateField
 from django.db import models
 
     fruit = models.ManyToManyField(Fruit)
 
     def __unicode__(self):
-        return u"%s's Farm: %s" % (self.owner.username, self.name)
+        return "%s's Farm: %s" % (self.owner.username, self.name)
 
 
 class City(models.Model):
     name = models.CharField(max_length=200)
     state = USStateField()
-    
+
     def __unicode__(self):
         return self.name