Your exact indentation you've pasted wouldn't throw that error, but in your real code, you must have the
def __unicode__
line at the exact indent depth as the other lines in your model.
Make sure you are using spaces and not tabs for all of your indents, as tabs can sometimes make the indent level seem the same as the others.
No comments:
Post a Comment