Skip to content Skip to sidebar Skip to footer

Why Did I Get Error For Python Manage.py Syncdb (indentationerror: Unexpected Indent)

from django.db import models class Post(models.Model): title = models.CharField(max_length=100) content = models.CharField(max_length=1000) created = models.DateField

Solution 1:

Did you mix tabs and spaces in the file? That is the most common cause of such an error.

Solution 2:

I couldn't help but notice the snippet you posted used tabs. Try the same code indented with spaces.

Solution 3:

You probably have spaces or tabs where there needs to be tabs or spaces.

Post a Comment for "Why Did I Get Error For Python Manage.py Syncdb (indentationerror: Unexpected Indent)"