1django error in models.py
2__str__ returned non-string (type
3--------------------------------
4def __str__(self):
5 return self.username
1from PIL import ImageTk as itk
2background = "background.png"
3'''
4Don't write it this way:
5photo = tk.PhotoImage(Image.open(background))
6'''
7# Correct way
8photo = itk.PhotoImage(file = background) # Use Pillow to import .jpeg etc.
9