Skip to content

Commit 84b32a5

Browse files
committed
__unicode__ belongs to python2
1 parent 986cd57 commit 84b32a5

File tree

2 files changed

+1
-4
lines changed

2 files changed

+1
-4
lines changed

examples/flask/basic.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,6 @@ class Car(db.Model):
1818
make = db.Column(db.String(50))
1919
model = db.Column(db.String(50))
2020

21-
def __unicode__(self):
22-
return self.name
23-
2421

2522
CarForm = model_form(Car)
2623

wtforms_sqlalchemy/fields.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ class QuerySelectField(SelectFieldBase):
4848
a string, this is the name of an attribute on the model object to use as
4949
the label text. If a one-argument callable, this callable will be passed
5050
model instance and expected to return the label text. Otherwise, the model
51-
object's `__str__` or `__unicode__` will be used.
51+
object's `__str__` will be used.
5252
5353
If `allow_blank` is set to `True`, then a blank choice will be added to the
5454
top of the list. Selecting this choice will result in the `data` property

0 commit comments

Comments
 (0)