I am using the following code and geting some indentation problem
from django.db import models
class Poll(models.Model):
question = models.CharField(max_length=200)
pub_date = models.DateTimeField('date published')
def __unicode__(self):
return self.question
I am geting following error
File "E:\Softwares\Django-1.1.1.tar\.py", line 7
def __unicode__(self):
^
IndentationError: unexpected indent
Most likely you’re using a mix of tabs and spaces in your indentation… Use all spaces / all tabs instead. (The most widely adopted style is to use 4 spaces per level of indent.)
To fix this particular instance of the problem, check make the
def __unicode__(self):line start with the same indent as thepub_date = ...line. Use the same indent + four extra spaces for thereturn ...line.