【发布时间】:2014-05-22 09:10:46
【问题描述】:
这是我的代码:
from django.db import models
from django.utils.encoding import smart_unicode
class SignUp(models.Model):
first_name = models.CharField(max_length=120, null=True, blank=True)
last_name = models.CharField(max_length=120, null=True, blank=True)
email = models.EmailField()
timestamp = models.DateTimeField(auto_now_add=True, auto_now=False)
updated = models.DateTimeField(auto_now_add=False, auto_now=True)
def __unicode__(self):
return smart_unicode(self.email)
这就是我得到的。请帮忙谢谢你。
updated = models.DateTimeField(auto_now_add=False, auto_now=True)
^
IndentationError: unindent 不匹配任何外部缩进级别
【问题讨论】:
-
嗨。 python 是一种具有非常强大的身份识别策略的语言。只需阅读此legacy.python.org/dev/peps/pep-0008